Skip to content

Commit 0da7c3c

Browse files
author
yangmv
committed
edit
1 parent 6ee7cf1 commit 0da7c3c

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

cmdb-example.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ password = 123456
1414
api_url = http://gw.xxx.com/mg/v2/sysconfig/settings/STORAGE/
1515

1616
[ssh]
17-
public_key = /Users/yangmv/.ssh/id_rsa.pub
17+
public_key = /root/.ssh/id_rsa.pub

docs/nginx_cmdb.conf

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ server
1313
index index.html index.htm;
1414
root /var/www/CMDB;
1515
server_name_in_redirect off;
16-
access_log off;
16+
#access_log off;
1717
client_max_body_size 20M;
1818
proxy_read_timeout 10;
1919

@@ -22,14 +22,18 @@ server
2222
}
2323

2424
location /v1/cmdb/ws/ {
25-
#proxy_set_header Host $http_host;
25+
access_log /var/log/nginx/ws_access.log;
26+
error_log /var/log/nginx/ws_error.log;
27+
# proxy_set_header Host $http_host;
2628
proxy_redirect off;
2729
proxy_set_header X-Real-IP $remote_addr;
2830
proxy_set_header X-Scheme $scheme;
2931
proxy_pass http://cmdb;
3032
proxy_http_version 1.1;
31-
proxy_set_header Upgrade $http_upgrade;
32-
proxy_set_header Connection "upgrade";
33+
proxy_set_header Upgrade websocket;
34+
proxy_set_header Connection Upgrade;
35+
#proxy_set_header Upgrade $http_upgrade;
36+
#proxy_set_header Connection "upgrade";
3337
}
3438

3539
location /v1/cmdb/ {

0 commit comments

Comments
 (0)