Technaureus Info Solutions Pvt. Ltd.April 28, 2018
NGINX is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server.
NGINX is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.
How to improve the performance of odoo using Nginx?
sudo service apache2 stop
sudo apt-get install nginx
Edit the Nginx main configuration file with a text editor and insert the following block after the line which specifies Nginx document root location.
sudo vim /etc/nginx/sites-enabled/default
Add the below code to specify the location:
location / {
proxy_pass http://127.0.0.1:8069;
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 $scheme;
Comment the existing location code as below:
#location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
# try_files $uri $uri/ =404;
#}
Now test the configuration with the command nginx -t
If it returns no error, then restart the Nginx.
Just run getenforcecommand to check if Selinux in enabled on your machine or not. If it views like enable, disable it.
To completely disable Selinux, open /etc/selinux/config file with a text editor and set the line SELINUX to disabled.
sudo systemctl restart nginx
OR
sudo service nginx restart
sudo service apache2 restart
If you're looking for expert guidance in choosing the right Software service for your business, feel free to reach out to us. Our team is here to assist you in making the best choice for your unique needs and objectives.
0