server {
listen 3080;
server_name 127.0.0.1;
root /home/php/html/public;
index index.php index.html index.htm default.php default.htm default.html;
# location ~* (runtime|application)/{
# return 403;
# }
#location / {
# if (!-e $request_filename){
# rewrite ^(.*)$ /index.php?s=$1 last; break;
# }
#}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html2;
}
location ~ \.php(/|$) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
set $fastcgi_script_name2 $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$") {
set $fastcgi_script_name2 $1;
set $path_info $2;
}
fastcgi_param PATH_INFO $path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name2;
fastcgi_param SCRIPT_NAME $fastcgi_script_name2;
}
}
nginx.conf配置文件
最新推荐文章于 2024-07-17 19:17:33 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)