I am trying to setup odoo and have it working from the port url
http://<ip address>:8069
I can get it to work in nginx if I serve it from the root
http://<ip address>
using this nginx conf
location / {
proxy_pass http://localhost:8069;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
However, I would like to serve if from a sub folder
http://<ip address>/odoo
So I would expect that I could set the odoo parameters
web.base.url = http://<ip address>/odoo
web.base.url.freeze = True
and add a rewrite rule to nginx
location /odoo/ {
rewrite ^/odoo(/.*)$ $1 break;
proxy_pass http://localhost:8069;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
but it does not work.
It seems to be ignoring web.base.url no matter what I set it to.
I found someone else that looks to be having the same issue.
https://www.digitalocean.com/community/questions/make-odoo-run-on-port-80-with-nginx
Why is it ignoring web.base.url?
It's not an answer to your question, but running it on a separate subdomain would be much easier.