请教个 nginx 的一个 location 写法

2025-03-22 10:24:27
推荐回答(1个)
回答1:

这样子就可以了。。
location / {
root /home/wwwroot/html/;
concat on;
location ~ .*\.(php|php5)$ {
proxy_pass /127.0.0.1:88;
include proxy.conf;
}
if ( !-e $request_filename ) {
proxy_pass /127.0.0.1:88;
}
}