blob: 76a4aae0df947398408f40f62a4c1e85aeb4bbe4 [file] [log] [blame]
server {
listen 80; # 代理默认端口,可改
server_name team2.10813352.xyz;
root /var/www/html;
index index.html;
# 代理 /api/v1/ 到后端服务
location /api/v1/ {
proxy_pass http://localhost:8088; # 你的后端暴露位置
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location = /favicon.ico { log_not_found off}; access_log off; }
location = /robots.txt { log_not_found off}; access_log off; allow all; }
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
expires max;
log_not_found off;
}
}