mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 17:05:17 +00:00
docs(help) nginx: add websockets
This commit is contained in:
parent
d563d34a7a
commit
c17fdf1f11
1 changed files with 21 additions and 1 deletions
22
HELP.md
22
HELP.md
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue