server {
listen 9999;
server_name localhost;
location /aisp/approval/ {
if ($is_mobile = 0) {
rewrite ^/aisp/approval/(.*)$
https://b.com/$1 permanent;
}
root /home/centos/web/h5; # 使用 root 指令
try_files $uri $uri/ /aisp/approval/index.html; # 确保指向正确的 index.html
}
location /aisp/approval/api/ {
limit_conn perip 1000;
proxy_pass http://10.156.166.23:9088/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
client_max_body_size 600M;
client_body_buffer_size 512k;
}
}