Last active
January 9, 2018 17:59
-
-
Save Ark74/edc931ef30af852a98847c883fed65b1 to your computer and use it in GitHub Desktop.
Simple Apache Reverse proxy Odoo
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
#!/bin/bash | |
echo '<VirtualHost *:80> | |
ServerName $DOMAIN | |
ServerAdmin webmaster@localhost | |
Redirect permanent / https://$DOMAIN | |
TransferLog /var/log/apache2/$DOMAIN.log | |
</VirtualHost> | |
<VirtualHost *:443> | |
ServerName $DOMAIN | |
ServerAdmin webmaster@localhost | |
ProxyRequests Off | |
SSLProxyEngine on | |
SSLEngine on | |
SSLCertificateFile $CERT | |
SSLCertificateKeyFile $KEY | |
RequestHeader set "X-Forwarded-Proto" "https" | |
ProxyPass / http://127.0.0.1:8069/ | |
ProxyPassReverse / http://127.0.0.1:8069/ | |
ProxyErrorOverride off | |
TransferLog /var/log/apache2/$DOMAIN.log | |
#Fix IE problem (httpapache proxy dav error 408/409) | |
SetEnv proxy-nokeepalive 1 | |
</VirtualHost>' | tee /etc/apache2/sites-available/000-default.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment