Skip to content

Instantly share code, notes, and snippets.

@TBSliver
Created December 28, 2020 14:40
Show Gist options
  • Save TBSliver/e06c23e53b54f9a465e9978bca9c3515 to your computer and use it in GitHub Desktop.
Save TBSliver/e06c23e53b54f9a465e9978bca9c3515 to your computer and use it in GitHub Desktop.
<VirtualHost *:80>
ServerName nodecg.example.com
Redirect permanent / https://nodecg.example.com/
</VirtualHost>
<VirtualHost *:443>
ServerName nodecg.example.com
ServerAdmin hosting@example.com
SSLEngine on
SSLCertificateFile /path/to/ssl/cert.crt
SSLCertificateKeyFile /path/to/ssl/cert.key
# Any other stuff for Lets Encrypt etc. as needed
RewriteEngine on
RewriteCond %{QUERY_STRING} transport=polling [NC]
RewriteRule /(.*) http://127.0.0.1:9200/$1 [P]
RewriteCond ${HTTP:Upgrade} websocket [NC]
RewriteRule .* "ws:/127.0.0.1:9200/$1" [P,L]
ProxyPass / http://127.0.0.1:9200/
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment