I have been trying to adapt AndrewBelt's nginx configuration to my apache2.4 server recently, and i managed to succeed. Just wanted to help some of you, i'm using SSL and port 443.
And hack.chat's websocket on port 8080
Loaded modules are proxy.load proxy_wstunnel.load and proxy_http.load
here is my vhost :
<VirtualHost *:443>
ServerName domain.com
ServerAlias domain.com
DocumentRoot /var/www/domain.com/
CustomLog /var/log/apache2/secure_access.log combined
SSLEngine on
SSLCertificateFile /path/to/ssl/cert/fullchain.pem
SSLCertificateKeyFile /path/to/ssl/cert/privkey.pem
SSLCACertificateFile /path/to/ssl/cert/chain.pem
SSLVerifyClient None
ProxyPreserveHost On
ProxyRequests Off
ProxyAddHeaders On
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
RequestHeader set Host %{HTTP_HOST}s
RequestHeader set X-Forwarded-For %{X-Forwarded-For}i
ProxyPass /chat-ws ws://localhost:8080/
ProxyPassReverse /chat-ws ws://localhost:8080/
</VirtualHost>
I have been trying to adapt AndrewBelt's nginx configuration to my apache2.4 server recently, and i managed to succeed. Just wanted to help some of you, i'm using SSL and port 443. And hack.chat's websocket on port 8080 Loaded modules are proxy.load proxy_wstunnel.load and proxy_http.load
here is my vhost :
Hope it helps.