-
-
Save keokilee/9980702b6b687fd32403 to your computer and use it in GitHub Desktop.
Rails On Windows - HTTPS Config
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 _default_:80> | |
ServerName localhost | |
Redirect permanent / https://localhost | |
</VirtualHost> | |
# Default SSL Virtual Host configuration. | |
<IfModule !ssl_module> | |
LoadModule ssl_module modules/mod_ssl.so | |
</IfModule> | |
Listen 443 | |
<VirtualHost _default_:443> | |
ServerName localhost | |
DocumentRoot “C:/<ruby stack>/projects/<project dir>/public” | |
<Directory “C:/<ruby stack>/projects/<project dir>/public”> | |
Allow from all | |
Options -MultiViews | |
Require all granted | |
</Directory> | |
RewriteEngine On | |
SSLProxyEngine On | |
SSLEngine On | |
SSLProxyVerify none | |
SSLProxyCheckPeerCN off | |
SSLProxyCheckPeerName off | |
SSLProxyCheckPeerExpire off | |
SSLCertificateFile “C:/<path to ssl cert>/cert.pem” | |
SSLCertificateKeyFile “C:/<path to ssl cert>/server.key” | |
SSLProxyMachineCertificateFile “C:/<path to ssl cert>/key.pem” | |
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f | |
RewriteRule ^/(.*)$ balancer://app_balancers%{REQUEST_URI} [P,QSA,L] | |
<Proxy balancer://app_balancers> | |
BalancerMember https://localhost:3000/ | |
BalancerMember https://localhost:3001/ | |
</Proxy> | |
<LocationMatch “^/assets/.*$”> | |
Header unset ETag | |
FileETag None | |
# RFC says only cache for 1 year | |
ExpiresActive On | |
ExpiresDefault “access plus 1 year” | |
</LocationMatch> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment