server {
listen 80;
server_name _;
#root /var/www/html;
root /var/www/html/erp/public;

index index.php index.html index.htm;

location / {
#try_files $uri $uri/ /index.php?$query_string;
if (!-e $request_filename){
rewrite ^/(.*)$ /index.php?s=/$1 last;
break;
}
}

# 处理 PHP 脚本
location ~ .php$ {

include fastcgi_params;
fastcgi_pass 127.0.0.1:9000; # php-fpm 的监听地址
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
}

 https://blog.c*s**dn.net/chendongpu/article/details/126224100

本站提供的所有下载资源均来自互联网,仅提供学习交流使用,版权归原作者所有。如需商业使用,请联系原作者获得授权。 如您发现有涉嫌侵权的内容,请联系我们 邮箱:[email protected]