nginx不支持pathinfo,导致thinkphp出错解决办法
1.网站504报错,不一定是服务器fastcgi,超时时间的问题也有可能是php连接数据库失败引起的超时问题导致504错误!!! 2.要清楚自己的你nginx服务器是否支持pathinfo模式,如果不支持 我们要修改nginx的配置使其支持 下面是修改nginx.conf使其支持pathinfo模式
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break; }} location ~ \.php { #去掉$root /www/html;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_split_path_info ^(.+\.php)(.*)$; #增加这一句fastcgi_param PATH_INFO $fastcgi_path_info; #增加这一句fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;include fastcgi_params;}
|

浙公网安备 33010602011771号