-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf.example
More file actions
57 lines (48 loc) · 1.64 KB
/
nginx.conf.example
File metadata and controls
57 lines (48 loc) · 1.64 KB
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
# RunPaceFlow Nginx 反向代理配置示例
# 将以下内容添加到你的 Nginx 配置中(如 /etc/nginx/conf.d/runpaceflow.conf)
# Frontend - run.example.com
server {
listen 443 ssl http2;
server_name run.example.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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_set_header X-Forwarded-Proto $scheme;
# SSE 支持(runtime-config stream)
proxy_buffering off;
proxy_cache off;
}
}
# Admin - admin.run.example.com
server {
listen 443 ssl http2;
server_name admin.run.example.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
location / {
proxy_pass http://127.0.0.1:3030;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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_set_header X-Forwarded-Proto $scheme;
# SSE 支持(settings stream)
proxy_buffering off;
proxy_cache off;
}
}
# HTTP -> HTTPS 重定向(可选)
server {
listen 80;
server_name run.example.com admin.run.example.com;
return 301 https://$host$request_uri;
}