chuxia 发表于 2012-9-4 11:17:41

fuelcms nginx部署问题

用fuelcms做了个blog,以ubunt10.04,nginx,phpfpm部署,结果总是502错误。测试 http://www.liubt.com。

谢谢

初夏.dev 发表于 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

dd_whu 发表于 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'; ,如果确实搞不定,暂且这样用着吧。

lnlingyuan 发表于 2013-3-12 13:24:25

做个标记
页: [1]
查看完整版本: fuelcms nginx部署问题