nginx支持thinkphp的pathinfo nginxpathinfo 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这会有把 location ~ \.php$ { 改成 location ~ \.php/?.*$ { 和 location ~ .+\.php($|/) { ,改完后nginx -s reload后发现还是没用。 server { listen 80; server_name www.phpno.com; root /home/www/www_phpno_com/admin_wwwroot; access_log off; error_page 404 /404.html; location /404.html { root /home/www/www_phpno_com/admin_wwwroot; } location /{ index index.html index.htm index.php; if (-e $request_filename) { break; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; break; } } location ~ .+\.php($|/) { root /home/www/www_phpno_com/admin_wwwroot; fastcgi_index index.php; fastcgi_split_path_info ^(.+\.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; fastcgi_pass 127.0.0.1:9000; include fastcgi_params; } }自己对比一下 感谢热心的徐版主。我按您贴出的配置改了,除了路径。 但还是不行。我的nginx版本是1.6.2。错误日志还是 CreateFile() "D:/AppServ/www/login" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /login HTTP/1.1", host: "localhost" 我现在的配置文件是这样的:location / { root D:/AppServ/www; index index.php index.html index.htm; if (-e $request_filename) { break; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; break; } }location ~ .+\.php($|/) { root D:/AppServ/www; fastcgi_index index.php; fastcgi_split_path_info ^(.+\.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; fastcgi_pass 127.0.0.1:9000; include fastcgi_params; } PHP,LAMP系列免费视频教程 第四章(1)函数的声明与应用(一) 吐血了,提个PHP写XML的问题 php 中有没有C#里的 WebClient 类 我有段代码不知道怎样转变成PHP代码 将文本框中内容保存到txt文本中 nginx的rewrite的伪静态正则问题 如何将分页添加进条件查询中。 请推荐一个好用的开源的cms, php 帮忙看下这段代码怎样改 sublime text2标签页不显示问题 thinkphp三表联合查询的一个问题 php出现致命错误为何返回的还是200状态 关于PHP自助建站系统,有谁有源码吗?
listen 80;
server_name www.phpno.com;
root /home/www/www_phpno_com/admin_wwwroot;
access_log off;
error_page 404 /404.html;
location /404.html {
root /home/www/www_phpno_com/admin_wwwroot;
}
location /{
index index.html index.htm index.php;
if (-e $request_filename) {
break;
}
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
location ~ .+\.php($|/) {
root /home/www/www_phpno_com/admin_wwwroot;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.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;
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
}
}自己对比一下
我按您贴出的配置改了,除了路径。 但还是不行。我的nginx版本是1.6.2。错误日志还是
CreateFile() "D:/AppServ/www/login" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /login HTTP/1.1", host: "localhost"
root D:/AppServ/www;
index index.php index.html index.htm;
if (-e $request_filename) {
break;
}
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
location ~ .+\.php($|/) {
root D:/AppServ/www;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.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;
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
}