Skip to content

Instantly share code, notes, and snippets.

@mapcentia
Created April 26, 2017 11:10
Show Gist options
  • Save mapcentia/f376c4bf43dd291eb42accdab3f693da to your computer and use it in GitHub Desktop.
Save mapcentia/f376c4bf43dd291eb42accdab3f693da to your computer and use it in GitHub Desktop.
<VirtualHost *:80>
ServerName webgis.geopartner.dk
ProxyPreserveHost On
ProxyRequests Off
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L]
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/socket.io [NC]
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule /(.*) ws://172.17.0.3:3000/$1 [P,L]
ProxyPass / http://172.17.0.3:3000/ retry=0
ProxyPassReverse / http://172.17.0.3:3000/ retry=0
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
include /etc/apache2/sites-enabled/gc2
Include /etc/apache2/ssl/options-ssl-apache.conf
ServerName webgis.geopartner.dk
ProxyPreserveHost On
ProxyRequests Off
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/socket.io [NC]
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule /(.*) ws://172.17.0.3:3000/$1 [P,L]
ProxyPass / http://172.17.0.3:3000/ retry=0
ProxyPassReverse / http://172.17.0.3:3000/ retry=0
# Uncomment the lines and change the example.com.key to your generated key file
SSLCertificateFile /etc/apache2/ssl/assens-vidi.mapcentia.com/fullchain.cer
SSLCertificateKeyFile /etc/apache2/ssl/assens-vidi.mapcentia.com/assens-vidi.mapcentia.com.key
</VirtualHost>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment