|
本帖最后由 chinesebear 于 2014-9-20 22:16 编辑
分析记录:
9-20 19:40:暂时感觉是nginx没配置好,导致CI在解析URI的时候,出现了死循环,nginx判断并发过多,给出了500错误,下一步跟踪一下URI解析。
9-20 20:58:前一个分析是错误,现在问题聚焦在nginx的rewrite规则。
9-20 22:08:问题搞定了,感谢57sy.com的提供的nginx配置文件;问题出在nginx的rewrite规则的"location /"。
解决方案如下:
sudo vi /etc/nginx/sites-available/default
----------------------------------------------------
# Make site accessible from http://localhost/
server_name localhost;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$args;//修改的地方,原先为“/index.html”
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
php服务器是nginx
CI是最新的2.2,原码没改过
打开连接:http://192.168.3.106/index.php/welcome出现了一下错误
11
输入http://192.168.3.106/index.php/welcome.php 就没问题了
或者http://192.168.3.106/index.php
或者http://192.168.3.106/都没有问题
12
这是服务器nginx的问题,还是我配置的问题,哪位大侠帮我看看!
补充:
我以前用CI做的网站在WAMP(LAMP)上,输入http://localhost/dfjg/index.php/home,就不会500这样的错误
错误的意思是说什么并发问题,但是我感觉还是出在,CI本身的机制上,应该在CI的内核上,解析URL出了问题,没有高手就得自己上了。有线索的给我点提示,加快fix的速度。
|
|