File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ Nginx版本:`1.11.5`
71
71
- [ 防盗图配置] ( #防盗图配置 )
72
72
- [ 屏蔽.git等文件] ( #屏蔽git等文件 )
73
73
- [ 域名路径加不加需要都能正常访问] ( #域名路径加不加需要都能正常访问 )
74
+ - [ cockpit] ( #cockpit )
74
75
- [ 错误问题] ( #错误问题 )
75
76
- [ 精品文章参考] ( #精品文章参考 )
76
77
@@ -1431,6 +1432,36 @@ if ($rule_1 = "21"){
1431
1432
}
1432
1433
```
1433
1434
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
+
1434
1465
## 错误问题
1435
1466
1436
1467
``` bash
You can’t perform that action at this time.
0 commit comments