8000 Update README.md · jaywcjlove/nginx-tutorial@ed2ee2b · GitHub
[go: up one dir, main page]

Skip to content

Commit ed2ee2b

Browse files
authored
Update README.md
1 parent b2a8810 commit ed2ee2b

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Nginx版本:`1.11.5`
7171
- [防盗图配置](#防盗图配置)
7272
- [屏蔽.git等文件](#屏蔽git等文件)
7373
- [域名路径加不加需要都能正常访问](#域名路径加不加需要都能正常访问)
74+
- [cockpit](#cockpit)
7475
- [错误问题](#错误问题)
7576
- [精品文章参考](#精品文章参考)
7677

@@ -1431,6 +1432,36 @@ if ($rule_1 = "21"){
14311432
}
14321433
```
14331434

1435+
### cockpit
1436+
1437+
```nginx
1438+
server{
1439+
    listen 80;
1440+
    server_name cockpit.xxxxxxx.com;
1441+
    return 301 https://$server_name$request_uri;
1442+
}
1443+
1444+
server {
1445+
    listen 443 ssl;
1446+
    server_name cockpit.xxxxxxx.com;
1447+
1448+
    #ssl on;
1449+
    ssl_certificate /etc/nginx/cert/cockpit.xxxxxxx.com.pem;
1450+
    ssl_certificate_key /etc/nginx/cert/cockpit.xxxxxxx.com.key;
1451+
1452+
    location / {
1453+
        root /;
1454+
        index index.html;
1455+
        proxy_redirect off;
1456+
        proxy_pass http://websocket;
1457+
        proxy_http_version 1.1;
1458+
        proxy_set_header Upgrade $http_upgrade;
1459+
        proxy_set_header Connection "upgrade";
1460+
        proxy_set_header Host $http_host;
1461+
    }
1462+
}
1463+
```
1464+
14341465
## 错误问题
14351466

14361467
```bash

0 commit comments

Comments
 (0)
0