Professional Documents
Culture Documents
Othmane Ghandi
·
Follow
4 min read
·
Feb 6, 2020
46
1
Normally you can run your odoo server with any open port inside
your server, you just need to specify it in your Odoo Config (by
default is 8069). In this case, we are talking about http
Our concern is to add the “s” letter (stands for security) at the end of
http (HTTPS) => you need to use the 443 port
Okey ! why we don’t just specify 443 port inside Odoo config ? and
we get the connection.
Thinking smart
The https is not about the port number (even if it’s the conventional
port to use for this kind of communication) but more importantly the
secure layer that is used on top of it, which give more protection to
your data and communication. That’s why we use a web server like
Nginx
1/ Nginx and the other web servers comes to implement the ssl layer,
secure the communication, manage the data traffic and optimize
performances. Is like a traffic cop
Traffic cop
Once the installation finished, you can check its status by using this
command:
#> sudo systemctl status nginx
You can check your installation by
opening http://your_ip_address or localhost in your browser
1/ Install certbot :
#> sudo apt update
#> sudo apt install certbot
we can use an Nginx snippet for the mapping and use later in our
files
#> sudo nano /etc/nginx/snippets/letsencrypt.conf
include snippets/letsencrypt.conf;
}
Now that you have the certificate files, you can edit your domain
server block /etc/nginx/sites-available/your_domain.conf as follows:
NB: You need to change the 8069 port by the port that you are using
& your_domain.com by your real domain
Restart Nginx :
sudo systemctl restart nginx
1/ In your Odoo config file you need to enable the proxy mode by
adding : proxy_mode = True
You can check the official page to know how do we get these
numbers
Change XX by the size you want. Upload size can be a blocker when
you try to add attatchments in Odoo greater then 1MB
Odoo
Nginx
Certbot
Web Server
Ssl Certificate
46
1
Written by Othmane Ghandi