forked from aide-family/moon
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnginx.conf
49 lines (43 loc) · 1.59 KB
/
nginx.conf
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
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name prometheus.aide-cloud.cn;
root /usr/share/nginx/html;
ssl_certificate "/etc/nginx/ssl/prometheus.aide-cloud.cn_bundle.crt";
ssl_certificate_key "/etc/nginx/ssl/prometheus.aide-cloud.cn.key";
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
# Load configuration files for the default server block.
# include /etc/nginx/default.d/*.conf;
location ~ ^/(api|msg|metrics|ping|server) {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8001;
}
location /ws {
proxy_pass http://localhost:8888;
proxy_read_timeout 500;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
# ws 协议专用头
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8000;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}