centos安装LEMP
网址:http://www.since2006.com/blog/212
还是先参考linode知识库的安装指南 :-)
http://library.linode.com/lemp-guides/centos-5
不过文章中安装php-fastcgi处只将php-fastcgi设置为开机自动启动,而漏了启动php-fastcgi本身了,导致在后面测试php时,nginx一直报"502 Bad Gateway"错处,查找了半天才发现问题。
启动一下再测试。
#/etc/init.d/php-fastcgi start
直接使用安装指南中的配置,还会有一些小问题。比如上传文件大于1M多时,Nginx报“Nginx: 413 Request Entity Too Large Error”。
可以在站点配置的server块下加入:
client_max_body_size 20M; # 设置客户端最大能上传文件大小
@2011-11-19:参考安装指南中方法安装,php不支持gd库。
通过下面命令安装即可:
yum install php-gd /etc/init.d/php-fastcgi restart

本文相关评论|Comments