Created
September 7, 2018 22:04
-
-
Save slavanap/cf37ff4438fb55dee1bed3cc7a4ca4ce to your computer and use it in GitHub Desktop.
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> | |
Alias "/.well-known" "/var/www/html/.well-known" | |
# redirect other paths to https | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !/.well-known/.* | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^/?(.*) https://%{SERVER_NAME}/ [R,L] | |
</VirtualHost> | |
<VirtualHost *:443> | |
ProxyPreserveHost On | |
ProxyPass / http://127.0.0.1:50000/ | |
ProxyPassReverse / http://127.0.0.1:50000/ | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
SSLEngine on | |
SSLCertificateFile /etc/letsencrypt/live/contoso.org/cert.pem | |
SSLCertificateKeyFile /etc/letsencrypt/live/contoso.org/privkey.pem | |
SSLCertificateChainFile /etc/letsencrypt/live/contoso.org/fullchain.pem | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment