Files
wecom_it_smart_desk/deploy-server/nginx.conf
T

35 lines
963 B
Nginx Configuration File
Raw Normal View History

server {
listen 80;
listen [::]:80;
server_name localhost;
# 前端静态文件
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
# API 反向代理到后端
location /api/ {
proxy_pass http://wecom_it_backend_green: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;
}
# H5 端点反向代理
location /h5/ {
proxy_pass http://wecom_it_backend_green: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;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}