server {
listen 9999;
server_name localhost;
location /aisp/approval/ {
if ($is_mobile = 0) {
rewrite ^/aisp/approval/(.*)$ https://b.com/$1 permanent;
}
alias /home/centos/web/h5/;
try_files $uri $uri/ /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;
}
}
现在的问题是通过移动端请求a.com/aisp/approval/workOrder/orderHandlerDetails,error.log 会报:
open() "/usr/local/nginx/html/home/centos/supervision/web/h5/index.html" failed (2: No such file or directory)
/usr/local/nginx/html 是我 nginx 的安装目录,我要如何配置才能在请求 a.com/aisp/approval/workOrder/时响应/home/centos/supervision/web/h5/目录下的 index.html