Update odoo_install.sh

pull/372/head
Maged Ibrahem 3 years ago
parent 560e2cdfc6
commit e864a4c805

@ -12,7 +12,7 @@
# sudo chmod +x odoo-install.sh # sudo chmod +x odoo-install.sh
# Execute the script to install Odoo: # Execute the script to install Odoo:
# ./odoo-install # ./odoo-install
################################################################################# ################################################################################
OE_USER="odoo" OE_USER="odoo"
OE_HOME="/$OE_USER" OE_HOME="/$OE_USER"
@ -282,6 +282,10 @@ 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 > ~/odoo
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server { server {
listen 80; listen 80;
@ -335,8 +339,14 @@ server {
proxy_redirect off; proxy_redirect off;
} }
location /longpolling { location /websocket {
proxy_pass http://127.0.0.1:$LONGPOLLING_PORT; proxy_pass http://127.0.0.1:$LONGPOLLING_PORT;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
} }
location ~* .(js|css|png|jpg|jpeg|gif|ico)$ { location ~* .(js|css|png|jpg|jpeg|gif|ico)$ {

Loading…
Cancel
Save