Report this

What is the reason for this report?

run odoo with nginx at port 80

Posted on December 16, 2017

hi, I have an odoo instance running at http://www.johnstonebros.ie:8069/ I want to run it at default port 80 with nginx server. my nginx is working at http://www.johnstonebros.ie:8000

How can port 8069 to 80? Thanks.



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!

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.

i have installed odoo12 on my vps. link my domain surveyspan.com without ssl certificate now i make configuration of https :

https://www.surveyspan.com/ this will work but odoo not working http://surveyspan.com/web/login this will work but not showing not secure please help me for this.

You can configure Nginx to proxy all requests to port 8069. Start by creating a server block for your domain by following the How To Set Up Nginx Server Blocks (Virtual Hosts) on Ubuntu 16.04 tutorial.

Once you’re done, open the newly-created server block in text editor. Locate the locate / block under the server block. It should look like the following one:

...
    location / {
        try_files $uri $uri/ =404;
    }
...

Replace it with the below one:

...
    location / {
        proxy_pass http://localhost:8069;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
...

Save the file and close your text editor. You can check Nginx’s configuration files to make sure they’re correctly typed:

  1. sudo nginx -t

You should see output mentioning tests are passing successfully.

Output
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful

Lastly, to put changes in the effect, reload Nginx.

  1. sudo systemctl reload nginx

This should do the job. When you point web browser to your domain, you should see Oddo running there.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.