Skip to content

Instantly share code, notes, and snippets.

@rdelcueto
Created January 23, 2014 07:33
Show Gist options
  • Save rdelcueto/8574452 to your computer and use it in GitHub Desktop.
Save rdelcueto/8574452 to your computer and use it in GitHub Desktop.
Apache Proxy Site Template for Torquebox Rails Application Redirects all traffic to https. Proxies traffic to JBossAS7 Server
<VirtualHost *:80>
ServerName example.com
Redirect / https://example.com/
</VirtualHost>
<VirtualHost *:443>
RequestHeader set X-Forwarded-Proto "https"
SSLEngine on
SSLProxyEngine On
SSLCertificateFile /etc/apache2/ssl/example.crt
SSLCertificateKeyFile /etc/apache2/ssl/example.key
SSLCertificateChainFile /etc/apache2/ssl/example.ca-bundle
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
SSLRequireSSL
Order allow,deny
Allow from all
</Location>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment