docs(help) nginx: add websockets

This commit is contained in:
coderaiser 2014-01-09 11:30:58 +02:00
parent d563d34a7a
commit c17fdf1f11

22
HELP.md
View file

@ -245,7 +245,14 @@ server {
server_name io.cloudcmd.io;
access_log /var/log/nginx/io.cloudcmd.io.access.log;
location / {
proxy_pass http://127.0.0.1:8000/;
# websocket block
# support for nginx from v1.3.13
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# websocket block
proxy_pass http://127.0.0.1:8000/;
}
}
```
@ -267,6 +274,19 @@ server {
}
```
For websocket suport (nginx >= v1.3.13) modify server block:
```sh
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://127.0.0.1:8000/;
}
```
If you need redirection from **http** to **https**, it's simple:
```sh