Friday, 15 March 2019

Forward port 8069 to 80 by Nginx

Forward port 8069 to 80  by Nginx 

(odoo 11)

 

 

Introduction

 


 

Install Nginx to facilitate user access

 

You can redirect traffic on the default HTTP port (80) and the default HTTPS port (443) to Odoo (running on port 8069) so that users no longer have to add the port number 8069 every time they access the system. Using Nginx also enables you to secure Odoo using an SSL certificate, the process to install an SSL certificate for Nginx is described here.
Install Nginx.
sudo apt-get install nginx
Edit the Nginx site configuration file using a text editor, such as nano.
nano /etc/nginx/sites-available/default
Find the following two lines.
location / {
}
Add the following segment.
location / {
    proxy_pass http://127.0.0.1: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;
}
Restart Nginx and set it to start automatically when the system boots.
systemctl restart nginx
systemctl start nginx
You can now visit the Odoo system from both port 8069 and port 80.
http://[your-instance-IP]:8069
http://[your-instance-IP]
http://yuvarajxp.com:8069 
http://yuvarajxp.com

 

No comments:

Post a Comment