Files
encrypt-decrypt-vuls/nginx/default.conf

21 lines
533 B
Plaintext
Raw Permalink Normal View History

2024-05-15 14:28:08 +08:00
server {
listen 80;
server_name _; # 修改为你的域名或者服务器IP
# 静态文件服务
location / {
root /var/www/html; # 设置网页根目录为 /var/www/html
index index.html; # 设置默认首页文件
}
# API转发
location /api {
2024-05-15 16:53:03 +08:00
rewrite ^/api(.*)$ $1 break;
2024-05-15 17:01:32 +08:00
proxy_pass http://gateway:8081;
2024-05-15 14:28:08 +08:00
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}