Skip to content

Optimización con NGINX

Ignacio Buioli edited this page Apr 15, 2021 · 6 revisions

Optimización NGINX

Instalación

sudo apt-get install nginx

Alta de nuevo Proxy

cd /etc/nginx/sites-available
sudo nano odoo

Escribir dentro del archivo odoo:

server {
  server_name 127.0.0.1:8069;
  add_header Strict-Transport-Security max-age=2592000;
  location / {
    proxy_pass http://127.0.0.1:8069/;
    proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
    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 https;
  }
  location /longpolling {
    proxy_pass http://127.0.0.1:8072/;
  }
}

Guardar el Archivo

Crear link simbólico

cd /etc/nginx/sites-enabled
sudo ln -s /etc/nginx/sites-available/odoo odoo
sudo service nginx reload