run odoo with nginx at port 80

Posted December 16, 2017 30.8k views

I have an odoo instance running at
I want to run it at default port 80 with nginx server.
my nginx is working at

How can port 8069 to 80? Thanks.

1 comment

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.

Submit an Answer
2 answers

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:

  • sudo nginx -t

You should see output mentioning tests are passing successfully.

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.

  • sudo systemctl reload nginx

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

by Justin Ellingwood
When using the Nginx web server, server blocks (similar to the virtual hosts in Apache) can be used to encapsulate configuration details and host more than one domain off of a single server. In this guide, we'll discuss how to configure server blocks in Nginx on an Ubuntu 16.04 server.

i have installed odoo12 on my vps. link my domain without ssl certificate now i make configuration of https : this will work but odoo not working this will work but not showing not secure
please help me for this.