Make Odoo run on port 80 with Nginx.

Hello, first of all sorry for my bad English. I’m new to vps and I’ve been learning to setup my own just now.

So I installed LEMP and Odoo in my VM, i installed WordPress on the lemp stack. Odoo is running in the different port of 8069. Right now if I open my public ip on http://my_public_id (i dont have a domain yet) it will right away show me the wordpress page.

What I want to achieve is, i want to be able to access my odoo via http://my_public_id/odoo rather than http://my_public_id:8069 I know, i probably should have use port 443 https rather than port 80 http, but I want to know how it works first.

I’ve been searching for answers in google, It’s about the server block and proxy passing, but I don’t know, the learning curve is too steep and my limitation to understand the English jargons doesn’t quite cut it. Please bear with my skill on this.

Thank you very much Ralobh

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Check out NGINX: Proxy folders to different root -

You need to add the following to your nginx virtual host config:

location /odoo/ {
    rewrite ^/odoo(/.*)$ $1 break;
    proxy_pass  http://localhost:8069/;
    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 https;
    proxy_redirect    off;

Make sure to restart nginx so that the changes take effect.

This comment has been deleted