websocket support in NGINX , see: #45

This commit is contained in:
Luigi Maselli committed 2013-06-30 23:44:58 +02:00
1 parent 60f29cdb18
commit de906a22aa
2 files changed
+9 -1

No files matched your search

+3
View File
@@ -1,4 +1,7 @@
#!/bin/bash #!/bin/bash
# latest stable NGINX 1.4.x with websocket support
add-apt-repository -y ppa:nginx/stable
apt-get install -y nginx dnsutils apt-get install -y nginx dnsutils
cat<<EOF > /etc/init/nginx-reloader.conf cat<<EOF > /etc/init/nginx-reloader.conf
+6 -1
View File
@@ -9,7 +9,12 @@ upstream $APP { server 127.0.0.1:$PORT; }
server { server {
listen 80; listen 80;
server_name $hostname; 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 EOF
nc -U $HOME/reload-nginx nc -U $HOME/reload-nginx