Created
January 23, 2014 07:33
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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