Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Apache
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName myserver.com
ProxyPreserveHost On
ProxyRequests Off
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://localhost:8000/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://localhost:8000/$1 [P,L]
ProxyPassReverse / http://localhost:8000/
SSLCertificateFile /etc/letsencrypt/live/myserver.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/myserver.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/myserver.com/chain.pem
</VirtualHost>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.