dashengchuma 发表于 2011-6-14 01:19:31

lnmp添加多个网站,出现502 Bad Gateway

我按教程的办法添加了一个域名,绑定到/home/wwwgp.运行PHP出现502 Bad Gateway,运行HTML等静态正常。而且安装时绑定的主目录/home/wwwor,运行PHP正常。这是什么原因呢?求高手解答。百度谷歌一整天,乱猜是绑定的这个目录的nginx不能启动,我找到配置文件,显示如下:
server
{
listen       80;
server_name gp.qibaiyi.com;
index index.html index.htm index.php default.html default.htm default.php;
root/home/wwwgp;
include discuz.conf;
location ~ .*\.(php|php5)?$
   {
    fastcgi_passunix:/tmp/php-cgi.sock;
    fastcgi_index index.php;
    include fcgi.conf;
   }
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
   {
    expires      30d;
   }
location ~ .*\.(js|css)?$
   {
    expires      12h;
   }
access_log off;
}

licess 发表于 2011-6-14 10:16:56

php-cgi 没启动吧
/etc/init.d/php-fpm start试试

dashengchuma 发表于 2011-6-14 10:24:00

军哥你好,
但是主目录是可以的哦。只是我绑定另外的网站才这样!

dashengchuma 发表于 2011-6-14 10:39:19

听说要写什么local,求指教

licess 发表于 2011-6-14 11:33:42

回复 2# 的帖子

没太明白啥意思,发配置看看

dashengchuma 发表于 2011-6-14 15:27:52

问题解决了。。。。原来是在lnmpa上添加虚拟主机,哈哈。:lol
页: [1]
查看完整版本: lnmp添加多个网站,出现502 Bad Gateway