Created
April 9, 2019 18:53
-
-
Save hazelement/f69b2043b470770730e936727b9b2067 to your computer and use it in GitHub Desktop.
Apache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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