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
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!
Check out NGINX: Proxy folders to different root - Raymii.org.
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.