Skip to content

Instantly share code, notes, and snippets.

@JedMeister
Last active February 2, 2017 05:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save JedMeister/64faedadf05aa5c3067ac032c6496784 to your computer and use it in GitHub Desktop.
ServerName localhost
<VirtualHost *:80>
RewriteEngine on
ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L]
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
ServerAdmin webmaster@localhost
Alias /.well-known/acme-challenge /var/www/lets-encrypt
<Directory /var/www/lets-encrypt>
Options None
AllowOverride None
Require all granted
</Directory>
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyVia On
ProxyPass /.well-known !
# Needed for real time message / chat feature (longpolling)
ProxyPass /longpolling/poll http://127.0.0.1:8072/longpolling/poll/ timeout=200
ProxyPass /longpolling/poll/ http://127.0.0.1:8072/longpolling/poll/ timeout=200
ProxyPassReverse /longpolling/poll/ http://127.0.0.1:8072/longpolling/poll/
ProxyPass / http://127.0.0.1:8069/ timeout=200
ProxyPassReverse / http://127.0.0.1:8069/
RequestHeader set "X-Forwarded-Proto" "https"
# Fix IE problem (http error 408/409)
SetEnv proxy-nokeepalive 1
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment