用户
 找回密码
 入住 CI 中国社区
搜索
查看: 4602|回复: 3
收起左侧

[FUEL CMS] fuelcms nginx部署问题

[复制链接]
发表于 2012-9-4 11:17:41 | 显示全部楼层 |阅读模式
用fuelcms做了个blog,以ubunt10.04,nginx,phpfpm部署,结果总是502错误。测试 http://www.liubt.com。

谢谢

发表于 2012-9-4 11:49:40 | 显示全部楼层
困扰了半个月,今天继续拿起。
一通搜索后,问题初步解决


Today I was getting “502 Bad Gateway” on a CI project , after digging into the problem I found out it is a problem of nginx fastcgi buffers , here is how to fix it : open /etc/nginx/nginx.conf

add the following lines into http section :

fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;

引自 http://stackoverflow.com/questions/1514576/drupal-nginx-php-cgi-502-bad-gateway-error
发表于 2013-1-13 10:26:57 | 显示全部楼层
nginx不支持apache的.htaccess,但可以通过修改nginx.conf来解决。
1.删除fuel安装目录下的.htaccess;
2.将
if ($request_filename !~ (js|css|images|img|robots.txt|index.php.*) ) {
                rewrite ^/(.*)$ /index.php/$1 last;
            }

            if (!-f $request_filename) {
                rewrite ^/(.*)(fuel/modules/.*) /$2 last;
                rewrite ^/(.*)(/assets/.*) /$2 last;
            }

            location ^~ /fuel/crons {
                deny all;
            }

            location ^~ /fuel/data_backup {
                deny all;
            }

加入到nginx.conf的location / 区块下

-------
http://getfuelcms.com/forums/discussion/77/howto-get-fuelcms-working-with-nginx/p1
可以参考一下这篇文字中提问者的配置来修改,原作者admin自己也不熟悉nginx,他建议修改 $config['index_page'] = 'index.php'; ,如果确实搞不定,暂且这样用着吧。
发表于 2013-3-12 13:24:25 | 显示全部楼层
做个标记

本版积分规则