Last active
July 22, 2024 14:41
-
-
Save jbarreraballestas/cbe388d9b3b4697de5fc2164f28b4e73 to your computer and use it in GitHub Desktop.
Odoo apache virtual host
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 *:80> | |
ServerName myodoodomain.com | |
RewriteEngine on | |
RewriteCond %{SERVER_NAME} =myodoodomain.com | |
RewriteRule ^ http://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] | |
</VirtualHost> | |
<IfModule mod_ssl.c> | |
<VirtualHost *:443> | |
ServerName myodoodomain.com | |
ProxyRequests Off | |
ProxyPass / http://localhost:8069/ retry=0 | |
ProxyPassReverse / http://localhost:8069/ retry=0 | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME} | |
RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS} | |
ProxyVia On | |
ProxyPreserveHost On | |
RewriteEngine On | |
RewriteCond %{HTTP:Upgrade} =websocket [NC] | |
RewriteRule /(.*) ws://127.0.0.1:8069/$1 [P,L] | |
RewriteCond %{HTTP:Upgrade} !=websocket [NC] | |
RewriteRule /(.*) http://127.0.0.1:8069/$1 [P,L] | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
SSLCertificateFile /etc/letsencrypt/live/myodoodomain.com/fullchain.pem | |
SSLCertificateKeyFile /etc/letsencrypt/live/myodoodomain.com/privkey.pem | |
</VirtualHost> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment