iris websocket

思考并回答以下问题:

Nginx

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
server {
listen 443 ssl;
server_name lessonsocket.zhiyajob.com;
ssl_certificate /apps/srv/cret/8019396_lessonsocket.zhiyajob.com.pem;
ssl_certificate_key /apps/srv/cret/8019396_lessonsocket.zhiyajob.com.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
charset utf-8;
location /(css|js|fonts|img)/ {
access_log off;
expires 1d;
try_files $uri @backend;
}

location ~ .*\.(jpg|xlsx)$ {
root "/Users/mac/go/src/carPortNew";
}

location / {
try_files /_not_exists_ @backend;
}

location @backend {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header Upgrade websocket;
proxy_set_header Connection upgrade;
proxy_pass http://127.0.0.1:8083;
}
}
0%