Changes to nginx

pull/119/head
Tony Benoy 7 years ago committed by GitHub
parent 1ae3076926
commit 63058ace3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -262,7 +262,7 @@ sudo su root -c "/etc/init.d/$OE_CONFIG start"
if [ $INSTALL_NGINX = "True" ]; then if [ $INSTALL_NGINX = "True" ]; then
echo -e "\n---- Installing and setting up Nginx ----" echo -e "\n---- Installing and setting up Nginx ----"
sudo apt install nginx -y sudo apt install nginx -y
cat <<EOF > ~/odoo cat <<EOF > ~/$OE_USER
server { server {
listen 80; listen 80;
@ -278,8 +278,8 @@ if [ $INSTALL_NGINX = "True" ]; then
add_header X-XSS-Protection "1; mode=block"; add_header X-XSS-Protection "1; mode=block";
# odoo log files # odoo log files
access_log /var/log/nginx/odoo-access.log; access_log /var/log/nginx/$OE_USER-access.log;
error_log /var/log/nginx/odoo-error.log; error_log /var/log/nginx/$OE_USER-error.log;
# increase proxy buffer size # increase proxy buffer size
proxy_buffers 16 64k; proxy_buffers 16 64k;
@ -328,10 +328,10 @@ if [ $INSTALL_NGINX = "True" ]; then
} }
EOF EOF
sudo mv ~/odoo /etc/nginx/sites-available/ mv ~/odoo /etc/nginx/sites-available/
sudo ln -s /etc/nginx/sites-available/odoo /etc/nginx/sites-enabled/odoo ln -s /etc/nginx/sites-available/odoo /etc/nginx/sites-enabled/odoo
sudo rm /etc/nginx/sites-enabled/default rm /etc/nginx/sites-enabled/default
sudo service nginx reload service nginx reload
else else
echo "Nginx isn't installed due to the choice of the user!" echo "Nginx isn't installed due to the choice of the user!"
@ -349,6 +349,6 @@ echo "Start Odoo service: sudo service $OE_CONFIG start"
echo "Stop Odoo service: sudo service $OE_CONFIG stop" echo "Stop Odoo service: sudo service $OE_CONFIG stop"
echo "Restart Odoo service: sudo service $OE_CONFIG restart" echo "Restart Odoo service: sudo service $OE_CONFIG restart"
if [ $INSTALL_NGINX = "True" ]; then if [ $INSTALL_NGINX = "True" ]; then
echo "Done! The Nginx server is up and running. Configuration can be found at /etc/nginx/sites-available/odoo" echo "Done! The Nginx server is up and running. Configuration can be found at /etc/nginx/sites-available/$OE_USER"
fi fi
echo "-----------------------------------------------------------" echo "-----------------------------------------------------------"

Loading…
Cancel
Save