-
Notifications
You must be signed in to change notification settings - Fork 121
/
client.nginx.conf.bak
66 lines (56 loc) · 1.69 KB
/
client.nginx.conf.bak
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
upstream wipi_client {
server 127.0.0.1:3001;
keepalive 64;
}
upstream wipi_admin {
server 127.0.0.1:3002;
keepalive 64;
}
server {
listen 80;
server_name blog.codingit.cn;
rewrite ^(.*)$ https://$host$1 permanent;
}
server {
listen 443 ssl http2;
server_name blog.codingit.cn;
ssl_certificate /apps/ssl/blog.codingit.cn/blog.codingit.cn.pem;
ssl_certificate_key /apps/ssl/blog.codingit.cn/blog.codingit.cn.key;
ssl_session_timeout 5m;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Nginx-Proxy true;
proxy_cache_bypass $http_upgrade;
proxy_pass http://wipi_client;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
listen 80;
server_name admin.blog.codingit.cn;
rewrite ^(.*)$ https://$host$1 permanent;
}
server {
listen 443 ssl http2;
server_name admin.blog.codingit.cn;
ssl_certificate /apps/ssl/admin.blog.codingit.cn/admin.blog.codingit.cn.pem;
ssl_certificate_key /apps/ssl/admin.blog.codingit.cn/admin.blog.codingit.cn.key;
ssl_session_timeout 5m;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Nginx-Proxy true;
proxy_cache_bypass $http_upgrade;
proxy_pass http://wipi_admin;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}