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

21 lines
587 B
Plaintext
Raw 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 16:54:58 +08:00
proxy_pass http://127.0.0.1:9100; # 将 /api 的请求转发到 http://127.0.0.1:9100
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;
}
}