ODOO 15 NGINX SSL DOMAIN INSTALL GUIDE

Описание к видео ODOO 15 NGINX SSL DOMAIN INSTALL GUIDE

ODOO 15 NGINX SSL DOMAIN INSTALL GUIDE
Stop the service of the Apache web server
systemctl stop apache2
And to remove Apache, use the following commands
sudo apt-get purge apache2*
Now it's safe to install and run nginx. To install nginx, use the following commands;
sudo apt-get install nginx

After running the above commands, nginx will be installed, and to run the nginx service, run;
sudo systemctl start nginx
To run Odoo using nginx as a reverse proxy, we have to do some configuration in the Nginx configuration file. The configuration file of nginx can be found using the path /etc/nginx/sites-enabled. There will be a default configuration file name default. Move to the path using,
cd /etc/nignx/sites-enabled

And open the configuration file using,
sudo vim default

Edit the existing server block or add a new one if it is not already created. Add the following code to the conf file.

server {
server_name odoo.lvh.me;
return 301 https://$server_name$request_uri;
}
server {
server_name odoo.lvh.me;
listen 443 ssl;
access_log /var/log/nginx/testing-access.log;
error_log /var/log/nginx/testing-error.log;
location /longpolling {
proxy_connect_timeout 3600;
proxy_read_timeout 3600;
proxy_send_timeout 3600;
send_timeout 3600;
proxy_pass http://127.0.0.1:8072;
}
location / {
proxy_connect_timeout 3600;
proxy_read_timeout 3600;
proxy_send_timeout 3600;
send_timeout 3600;
proxy_redirect off;
proxy_pass http://127.0.0.1:8016/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
ssl on;
ssl_certificate /etc/ssl/nginx/certificate.pem;
ssl_certificate_key /etc/ssl/nginx/key.pem;
ssl_session_timeout 30m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RS$';
ssl_prefer_server_ciphers on;
gzip on;
gzip_min_length 1000;
}

Let’s now restart the services for Odoo and nginx using the following commands

Комментарии

Информация по комментариям в разработке