How to install nginx and setup a reverse proxy for odoo

Published: 02 October 2024
on channel: SoftIQ Technologies
214
2

How to install nginx and setup a reverse proxy for Odoo

i.) Add a DNS record and redirect your sub domain to the IP

You can check if the record has propagated and available for the public via the sub domain and IP from https://www.dnswatch.info/


ii.) Install nginx and setup a reverse proxy
sudo apt install nginx

iii.) Remove the default files for nginx
sudo rm /etc/nginx/sites-enabled/default
sudo rm /etc/nginx/sites-available/default

iv.) Create and edit the nginx configuration file
sudo nano /etc/nginx/sites-available/odoo.conf

upstream odoo {
server 127.0.0.1:8069;
}

upstream odoochat {
server 127.0.0.1:8072;
}

server {
listen 80;
server_name odoo.softiqtechnologies.co.ke;

access_log /var/log/nginx/odoo.access.log;
error_log /var/log/nginx/odoo.error.log;

proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;


location / {
proxy_redirect off;
proxy_pass http://odoo;
}


location ~* /web/static/ {
proxy_cache_valid 200 90m;
proxy_buffering on;
expires 864000;
proxy_pass http://odoo;
}

gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;
gzip on;
}


v.) Create a symbolic link of the nginx conf file

sudo ln -s /etc/nginx/sites-available/odoo.conf /etc/nginx/sites-enabled/odoo.conf

vi.) Check the configuration and Restart nginx
sudo nginx –t
systemctl restart nginx

vii.) Run odoo using sub domain

Visit https://www.softiqtechnologies.co.ke/ for more info and please subscribe to our videos.

We welcome your comments and suggestions for future videos. Thanks!

Contact us on:
Email: [email protected]

Please buy us a cup of coffee:
Paypal: [email protected]


Watch video How to install nginx and setup a reverse proxy for odoo online without registration, duration hours minute second in high quality. This video was added by user SoftIQ Technologies 02 October 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 214 once and liked it 2 people.