Merge pull request #239 from FirmlyReality/master
remove in nginx_docklet.conf when nginx_port=80
This commit is contained in:
commit
3a25964b0b
|
@ -11,7 +11,7 @@ server
|
|||
|
||||
location ~ ^/(\d+\.\d+\.\d+\.\d+)/ {
|
||||
proxy_pass http://%PROXY_SERVER_IP:%PROXY_PORT;
|
||||
proxy_set_header Host $host:$server_port;
|
||||
proxy_set_header Host $host;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
|
|
|
@ -29,5 +29,12 @@ fi
|
|||
sed -i "s/%PROXY_PORT/${PROXY_PORT}/g" ${NGINX_CONF}/nginx_docklet.conf
|
||||
sed -i "s/%WEB_PORT/${WEB_PORT}/g" ${NGINX_CONF}/nginx_docklet.conf
|
||||
|
||||
if [ "${NGINX_PORT}" != "80" ]
|
||||
then
|
||||
sed -i "s/\$host/\$host:\$server_port/g" ${NGINX_CONF}/nginx_docklet.conf
|
||||
fi
|
||||
|
||||
|
||||
|
||||
echo "restart nginx..."
|
||||
/etc/init.d/nginx restart
|
||||
|
|
Loading…
Reference in New Issue