Skip to content

Instantly share code, notes, and snippets.

@alex4u2nv
Created August 19, 2019 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alex4u2nv/d184cec751398ea0f6ac4895cc1f61dd to your computer and use it in GitHub Desktop.
Save alex4u2nv/d184cec751398ea0f6ac4895cc1f61dd to your computer and use it in GitHub Desktop.
#
# This configuration file enables the default "Welcome" page if there
# is no default index page present for the root URL. To disable the
# Welcome page, comment out all the lines below.
#
# NOTE: if this file is removed, it will be restored on upgrades.
#
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