|
|
|
@ -199,6 +199,13 @@ if [ $OE_VERSION > "11.0" ];then
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sudo su root -c "printf 'xmlrpc_port = ${OE_PORT}\n' >> /etc/${OE_CONFIG}.conf"
|
|
|
|
sudo su root -c "printf 'xmlrpc_port = ${OE_PORT}\n' >> /etc/${OE_CONFIG}.conf"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ $OE_VERSION > "15.0" ];then
|
|
|
|
|
|
|
|
sudo su root -c "printf 'gevent_port = ${LONGPOLLING_PORT}\n' >> /etc/${OE_CONFIG}.conf"
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
sudo su root -c "printf 'longpolling_port = ${LONGPOLLING_PORT}\n' >> /etc/${OE_CONFIG}.conf"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
sudo su root -c "printf 'logfile = /var/log/${OE_USER}/${OE_CONFIG}.log\n' >> /etc/${OE_CONFIG}.conf"
|
|
|
|
sudo su root -c "printf 'logfile = /var/log/${OE_USER}/${OE_CONFIG}.log\n' >> /etc/${OE_CONFIG}.conf"
|
|
|
|
|
|
|
|
|
|
|
|
if [ $IS_ENTERPRISE = "True" ]; then
|
|
|
|
if [ $IS_ENTERPRISE = "True" ]; then
|
|
|
|
@ -300,6 +307,12 @@ 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;
|
|
|
|
|
|
|
|
|
|
|
|
@ -353,8 +366,15 @@ server {
|
|
|
|
proxy_redirect off;
|
|
|
|
proxy_redirect off;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
location /longpolling {
|
|
|
|
# Redirect websocket requests to odoo gevent port
|
|
|
|
|
|
|
|
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)$ {
|
|
|
|
|