Last active
April 4, 2018 14:01
-
-
Save 0xh3xa/d129d9bd973e9b25a8d48ff3b27ae777 to your computer and use it in GitHub Desktop.
Configure Apache2 httpd as Reverse proxy with https support
This file contains hidden or 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 *:443> | |
| ServerName exmple.com | |
| ServerAlias *exmple.com | |
| ServerAdmin user@gmail.com | |
| ProxyPreserveHost On | |
| ProxyRequests off | |
| AllowEncodedSlashes NoDecode | |
| <Proxy *> | |
| Order deny,allow | |
| Allow from all | |
| </Proxy> | |
| SSLEngine on | |
| SSLCertificateFile /etc/letsencrypt/live/exmple.com/fullchain.pem | |
| SSLCertificateKeyFile /etc/letsencrypt/live/exmple.com/privkey.pem | |
| Include /etc/letsencrypt/options-ssl-apache.conf | |
| ProxyPass / http://localhost:8080/ nocanon | |
| ProxyPassReverse / http://localhost:8080/ | |
| # RequestHeader set X-Forwarded-Proto "https" | |
| # RequestHeader set X-Forwarded-Port "443" | |
| LogLevel debug | |
| ErrorLog ${APACHE_LOG_DIR}/error.log | |
| CustomLog ${APACHE_LOG_DIR}/access.log combined | |
| </VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment