我是小白一枚.我用thinkphp开发网站.本地测试没问题.但是上传linux系统服务器Nginx.首页可以打开.查了一堆资料.说是Nginx服务器不支持thinkphp的PATHINFO.我就把url模式改为2.Nginx.conf里面添加` location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}` 结果就是网页无法访问....求解决办法....
5 回答
翻阅古今
TA贡献1780条经验 获得超5个赞
做一下pathinfo吧,或者换成apache
location ~ .*\.php
{
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_connect_timeout 300;
fastcgi_read_timeout 300;
fastcgi_send_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 32k;
fastcgi_busy_buffers_size 64k;
fastcgi_temp_file_write_size 64k;
include fastcgi_params;
}
- 5 回答
- 0 关注
- 388 浏览
添加回答
举报
0/150
提交
取消