Created
February 20, 2019 21:49
-
-
Save alex4u2nv/cec0198df96c00187fa1e68b689e3579 to your computer and use it in GitHub Desktop.
s3 vhost
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
Listen 443 | |
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 | |
SSLCipherSuite HIGH:!aNULL:!MD5 | |
SSLVerifyClient none | |
SSLCertificateFile /etc/ssl/certs/node-selfsigned.crt | |
SSLCertificateKeyFile /etc/ssl/private/node-selfsigned.key | |
LogLevel warn | |
<VirtualHost *:443> | |
SSLEngine on | |
SSLProxyEngine On | |
RewriteEngine on | |
RewriteMap lowercase int:tolower | |
#This sets the variable to env: | |
RewriteRule ^ - [E=SERVER_NAME:${lowercase:%{SERVER_NAME}}] | |
#Now interpolate makes variables available for proxypass & proxypassreverse: | |
ProxyPassInterpolateEnv On | |
ProxyPass / http://${SERVER_NAME}.s3-website-us-east-1.amazonaws.com/ interpolate | |
ProxyPassReverse / http://${SERVER_NAME}.s3-website-us-east-1.amazonaws.com/ interpolate | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment