This is closely related to the question here:
https://www.odoo.com/forum/help-1/question/howto-use-https-and-odoo-subfolder-with-odoo-12-official-docker-image-151737
In fact it is identical, except that I am not using docker, but have installed odoo using the debian repository. I would have just commented on the previous issue but I don't have enough karma as a new user.
However, to repeat what was said in that query, I want to access my odoo instance at an address like
https://<my ip>/odoo and https://<my subdomain>/odoo
I'd like to know two things:
1. What needs to be done with the Apache2 webserver proxy configurationso that requests to the above URLs with subfolder are correctly processed by Odoo?
2. What needs to be done so that the reverse proxy can work as HTTPS endpoint and forward the requests to the Odoo container?
I tried changing proxy_mode = True in /etc/odoo/odoo.conf and the following configuration file for apache (put in /etc/apache2/sites-available/odoo.conf and activated with a2ensite):
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
#
ProxyPass /odoo http://localhost:8069
ProxyPassReverse /odoo http://localhost:8069
I have tried several variations on this with no success. With the above config, the address seems to get redirected from https://<my domain>/odoo to https://<my domain>/web and I get a 404 not found error.
I also now tried this:
<Location /odoo>
ProxyPass http://localhost:8069 retry=0
# retry=0 => avoid 503's when restarting etherpad-lite
ProxyPassReverse http://localhost:8069
SetOutputFilter proxy-html
ProxyHTMLURLMap http://localhost:8069
</Location>
RewriteRule ^/odoo$ /odoo/ [R]
Based on
https://serverfault.com/questions/561892/how-to-handle-relative-urls-correctly-with-a-reverse-proxy/561897
bit I still get redirected to /web and get a 404