INSTALLER UN NOUVEAU SITE AVEC APACHE ET NODEJS

Retour

in your vhost add

<VirtualHost *:80>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} ^/socket.io [NC]
    RewriteCond %{QUERY_STRING} transport=websocket [NC]
    RewriteRule /(.*) ws://localhost:10000/$1 [P,L]

    ProxyRequests Off
    ProxyPass / http://localhost:8000/
    ProxyPassReverse / http://localhost:8000/
    ProxyPreserveHost On
</VirtualHost>

check theses modules

a2enmod proxy
a2enmod proxy_wstunnel
a2enmod proxy_http

exemple nodejs app :

var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello Apache!\n');
}).listen(8000, '127.0.0.1');

pour mettre letsencrypt : http://blog.raphaelpiccolo.com/?p=409
pour mettre un https de qualite max : http://blog.raphaelpiccolo.com/?p=19