Skip to content

Instantly share code, notes, and snippets.

@0x3bfc
Created May 16, 2016 17:13
Show Gist options
  • Save 0x3bfc/cdc2698d665ae38500d772bd4bfe65b4 to your computer and use it in GitHub Desktop.
Save 0x3bfc/cdc2698d665ae38500d772bd4bfe65b4 to your computer and use it in GitHub Desktop.
<VirtualHost _default_:443>
SSLEngine on
SSLCertificateFile "C:\Program Files (x86)\Apache Software Foundation\SSL\apache.crt"
SSLCertificateKeyFile "C:\Program Files (x86)\Apache Software Foundation\SSL\apache.key"
ServerName mylocalhost.com
ServerAdmin admin@mylocalhost.com
DocumentRoot "C:\Program Files (x86)\ParaView 4.1.0\share\paraview-4.1\www"
ErrorLog "logs/pv-error_log"
CustomLog "logs/pv-access_log" common
<Location "C:\Program Files (x86)\ParaView 4.1.0\share\paraview-4.1\www" >
SSLRequireSSL On
SSLVerifyClient optional
SSLVerifyDepth 1
SSLOptions +StdEnvVars +StrictRequire
</Location>
# Turn on the rewrite engine
RewriteEngine On
# This is the path the mapping file Jetty creates
RewriteMap session-to-port "txt:C:\Program Files (x86)\pythonLauncher\mapping\proxy.txt"
# This is the rewrite condition. Look for anything with a sessionId= in the query part of the URL and capture the value to use below.
RewriteCond %{QUERY_STRING} ^sessionId=(.*)$ [NC]
# This does the rewrite using the mapping file and the sessionId
RewriteRule ^/proxy.*$ wss://${session-to-port:%1}/wss [P]
<Directory "C:\Program Files (x86)\ParaView 4.1.0\share\paraview-4.1\www">
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
AllowOverride None
Require all granted
</Directory>
ProxyRequests off
ProxyPass /apps http://localhost:9000/apps
ProxyPassReverse /apps http://localhost:9000/apps
ProxyRequests off
ProxyPass /lib http://localhost:9000/lib
ProxyPassReverse /lib http://localhost:9000/lib
ProxyRequests off
ProxyPass /paraview http://localhost:9000/paraview
ProxyPassReverse /paraview http://localhost:9000/paraview
ProxyRequests off
ProxyPass /ext http://localhost:9000/ext
ProxyPassReverse /ext http://localhost:9000/ext
# application server
ProxyRequests off
ProxyPass / http://localhost:8181/
ProxyPassReverse / http://localhost:8181/
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment