VPS侦探论坛

 找回密码
 注册
查看: 5258|回复: 2

PATHINFO

[复制链接]
发表于 2012-7-16 17:22:45 | 显示全部楼层 |阅读模式

如何让NGINX支持PATHINFO
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-7-16 21:26:57 | 显示全部楼层


0.7.31 以上的版本
虚拟主机里      location ~ ^(.+\.php)(.*)$                                                            
  1.       {                                                                                    
  2.         try_files \$uri =404;
  3.         fastcgi_pass  unix:/tmp/php-cgi.sock;
  4.         fastcgi_index index.php;
  5.         fastcgi_split_path_info ^(.+\.php)(.*)$;
  6.         fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
  7.         fastcgi_param   PATH_INFO $fastcgi_path_info;
  8.         fastcgi_param   PATH_TRANSLATED $document_root$fastcgi_path_info;
  9.         include fastcgi_params;
  10.         #include fcgi.conf;
  11.       }
复制代码



替换php的location 这个,重启试试看
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-7-17 14:12:49 | 显示全部楼层

原帖由 licess 于 2012-7-16 21:26 发表
0.7.31 以上的版本
虚拟主机里      location ~ ^(.+\.php)(.*)$                                                            
      {                                                                         ...


貌似现在直接出现404的错误了.本来还可以打开首页的
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-23 11:26 , Processed in 0.025453 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表