server {
listen 80;
server_name www.lpp7.com m.lpp7.com;
root "D:/phpStudy/WWW/lpp7";
location / {
index index.html index.htm index.php;
try_files $uri $uri/ /index.php?$query_string;
if ( !-e $request_filename){
rewrite ^/(.*)$ /index.php/$1 last;
}
#autoindex on;
}
location ~ \.php(.*)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
}
nginx 配置时候,遇到访问任何页面都是跳转到首页,或者只能访问网站首页,访问其他页面404的问题
最新推荐文章于 2024-07-29 16:22:39 发布