- 积分
- 119
- 威望
-
- 金钱
-
- 注册时间
- 2010-7-12
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2016-1-16 13:16:36
|
显示全部楼层
回复 2# 的帖子
我的意思是(nginx默认情况下不支pathinfo模式,从而不能支持ThinkPHP)
翻了军哥的帖
按这个方法配置添加pathinfo支持,去掉include pathinfo的#,在try_files前加#重启nginx即可使用;
https://bbs.vpser.net/viewthread.php?tid=12838&highlight=pathinfo
http://域名/test.php/foo/bar.php?v=1 测试一下
结果从原来的404变成500错误 我的lnmp1.2 php5.4 mysql 5.1
是不是和子目录有关? 我的home/wwwroot/abc.com/ 下面 m是手机端域名绑定的目录 tp是 thinkphp web是pc客户端域名绑定的目录
===================================================
array ( 'USER' => 'www', 'HOME' => '/home/www', 'FCGI_ROLE' => 'RESPONDER', 'SCRIPT_FILENAME' => '/home/wwwroot/我的域名/webmahua/test.php', 'QUERY_STRING' => 'v=1', 'REQUEST_METHOD' => 'GET', 'CONTENT_TYPE' => '', 'CONTENT_LENGTH' => '', 'SCRIPT_NAME' => '/test.php', 'REQUEST_URI' => '/test.php/foo/bar.php?v=1', 'DOCUMENT_URI' => '/test.php', 'DOCUMENT_ROOT' => '/home/wwwroot/我的域名/webmahua', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'SERVER_SOFTWARE' => 'nginx/1.8.0', 'REMOTE_ADDR' => '谁的ip', 'REMOTE_PORT' => '9880', 'SERVER_ADDR' => '我的ip', 'SERVER_PORT' => '80', 'SERVER_NAME' => 'www.我的域名', 'REDIRECT_STATUS' => '200', 'PATH_INFO' => '/foo/bar.php', 'HTTP_HOST' => 'www.我的域名', 'HTTP_CONNECTION' => 'keep-alive', 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'HTTP_UPGRADE_INSECURE_REQUESTS' => '1', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36', 'HTTP_ACCEPT_ENCODING' => 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE' => 'zh-CN,zh;q=0.8', 'HTTP_COOKIE' => 'bdshare_firstime=1452764406474; CNZZDATA1257014739=583873336-1452764403-%7C1452843265; digg=%2C34967%2C34997%2C34971%2C', 'PHP_SELF' => '/foo/bar.php', 'REQUEST_TIME_FLOAT' => 1452924735.8168311, 'REQUEST_TIME' => 1452924735, )
===================================================
[ 本帖最后由 polar 于 2016-1-16 16:21 编辑 ] |
|