nginx 下 thinkphp 502 bad Gateway + "LNMP一键安装包的Nginx 502 Bad Gateway错误可能原因及解决方法"
参考: http://lnmp.org/faq/lnmp-Nginx-502-Bad-Gateway.html如果是非上述原因:请找到nginx.conf中 找到这一行 include enable-php.conf; 然后打开 include enable-php.conf; 看看 加入支持pathinfo 即可解决: location ~ [^
参考: http://lnmp.org/faq/lnmp-Nginx-502-Bad-Gateway.html
如果是非上述原因:
请找到nginx.conf中 找到这一行 include enable-php.conf;
然后打开 include enable-php.conf; 看看 加入支持pathinfo 即可解决:
location ~ [^/]\.php(/|$)
{
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
#fastcgi_index index.php;
#include fastcgi.conf;
fastcgi_index index.php;
include fastcgi.conf;
#include pathinfo.conf;
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;
}
另外thinkphp支持四种url访问方式 http://www.jb51.net/article/57928.htm
更多推荐
所有评论(0)