2026-07-04 21:01:39 +08:00
|
|
|
server {
|
|
|
|
|
listen 80;
|
|
|
|
|
listen [::]:80;
|
|
|
|
|
server_name localhost;
|
2026-06-14 16:49:18 +08:00
|
|
|
|
2026-07-04 21:01:39 +08:00
|
|
|
# 前端静态文件
|
|
|
|
|
location / {
|
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
|
index index.html index.htm;
|
2026-06-14 16:49:18 +08:00
|
|
|
}
|
|
|
|
|
|
2026-07-04 21:01:39 +08:00
|
|
|
# API 反向代理到后端
|
|
|
|
|
location /api/ {
|
|
|
|
|
proxy_pass http://wecom_it_backend:8000/;
|
|
|
|
|
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;
|
2026-06-14 16:49:18 +08:00
|
|
|
}
|
|
|
|
|
|
2026-07-04 21:01:39 +08:00
|
|
|
# H5 端点反向代理
|
|
|
|
|
location /h5/ {
|
|
|
|
|
proxy_pass http://wecom_it_backend:8000/;
|
|
|
|
|
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;
|
|
|
|
|
}
|
2026-06-14 16:49:18 +08:00
|
|
|
|
2026-07-04 21:01:39 +08:00
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
|
|
|
location = /50x.html {
|
|
|
|
|
root /usr/share/nginx/html;
|
2026-06-14 16:49:18 +08:00
|
|
|
}
|
|
|
|
|
}
|