diff --git a/plugins/nginx-vhosts/install b/plugins/nginx-vhosts/install index 96c7dcc7f..75752ed06 100755 --- a/plugins/nginx-vhosts/install +++ b/plugins/nginx-vhosts/install @@ -1,4 +1,7 @@ #!/bin/bash + +# latest stable NGINX 1.4.x with websocket support +add-apt-repository -y ppa:nginx/stable apt-get install -y nginx dnsutils cat< /etc/init/nginx-reloader.conf diff --git a/plugins/nginx-vhosts/post-deploy b/plugins/nginx-vhosts/post-deploy index 1200e5bba..615221d73 100755 --- a/plugins/nginx-vhosts/post-deploy +++ b/plugins/nginx-vhosts/post-deploy @@ -9,7 +9,12 @@ upstream $APP { server 127.0.0.1:$PORT; } server { listen 80; server_name $hostname; - location / { proxy_pass http://$APP; } + location / { + proxy_pass http://$APP; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } } EOF nc -U $HOME/reload-nginx