Skip to content

Instantly share code, notes, and snippets.

@rosswarren
Created November 23, 2011 23:02
Show Gist options
  • Save rosswarren/1390196 to your computer and use it in GitHub Desktop.
Save rosswarren/1390196 to your computer and use it in GitHub Desktop.
Proxy Apache to Thin with SSL
</Proxy *>
AddDefaultCharset off
Order deny,allow
Deny from all
Allow from localhost
</Proxy>
<VirtualHost *:80>
ServerName localhost
ProxyRequests Off
<Proxy *>
Order Allow,Deny
Allow from all
</Proxy>
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
ProxyVia On
</VirtualHost>
<VirtualHost *:443>
ServerName localhost
ProxyRequests Off
<Proxy *>
Order Allow,Deny
Allow from all
</Proxy>
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
ProxyVia On
ProxyPreserveHost On
RequestHeader set X_FORWARDED_PROTO 'https'
SSLEngine On
SSLProxyEngine On
SSLCertificateFile /etc/ssl/certs/selfsigned.pem
SSLProxyMachineCertificateFile /etc/ssl/certs/selfsigned.pem
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment