Giter Site home page Giter Site logo

bandermansour / nginx_setup_in_odoo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bithabib/nginx_setup_in_odoo

0.0 0.0 0.0 39 KB

This document provides step-by-step instructions for setting up NGINX as a reverse proxy for Odoo, a popular open-source business management software. By configuring NGINX to handle incoming requests and distribute them to the appropriate Odoo instances, you can enhance performance, security, and scalability of your Odoo deployment.

nginx_setup_in_odoo's Introduction

github : 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-11 https://github.com/bigsys-gnu/website_bigsys.git

Nginx setup in Odoo

Step 1: Install Nginx

sudo apt update
sudo apt upgrade
sudo apt install nginx

Step 2: Remove default Nginx configurations

sudo rm /etc/nginx/sites-enabled/default
sudo rm /etc/nginx/sites-available/default

Step 3: Create a new Nginx configuration for Odoo in the sites-available directory.

sudo nano /etc/nginx/sites-available/odoo15.conf

Step 4: Copy and paste the following configuration, ensure that you change the server_name directory to match your domain name.

upstream domain_name {
     server 127.0.0.1:8069;
}

server {
     listen 80;
     server_name domain_name;

     access_log /var/log/nginx/access.log;
     error_log /var/log/nginx/error.log;
     client_max_body_size 100M;
     proxy_read_timeout 720s;
     proxy_connect_timeout 720s;
     proxy_send_timeout 720s;
     proxy_set_header X-Forwarded-Host $host;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_set_header X-Forwarded-Proto https;
     proxy_set_header X-Real-IP $remote_addr;

     location / {
        proxy_redirect http://domain_name/ https://domain_name/;
        proxy_pass http://domain_name;
     }
     location ~* /web/static/ {
         proxy_cache_valid 200 90m;
         proxy_buffering on;
         expires 864000;
         proxy_pass http://domain_name;
     }

     gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;
     gzip on;
 }

Hit Ctrl+X followed by Y and Enter to save the file and exit.

Step 5: To enable this newly created website configuration, symlink the file that you just created into the sites-enabled directory.

sudo ln -s /etc/nginx/sites-available/odoo15.conf /etc/nginx/sites-enabled/odoo15.conf

Step 6: Check your configuration and restart Nginx for the changes to take effect.

sudo nginx -t
sudo service nginx restart

Reference

nginx_setup_in_odoo's People

Contributors

bithabib avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.