VPS侦探论坛

 找回密码
 注册
查看: 7766|回复: 5

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

[复制链接]
发表于 2011-6-14 01:19:31 | 显示全部楼层 |阅读模式

我按教程的办法添加了一个域名,绑定到/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_pass  unix:/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;
}
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-6-14 10:16:56 | 显示全部楼层


php-cgi 没启动吧
/etc/init.d/php-fpm start试试
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-6-14 10:24:00 | 显示全部楼层

军哥你好,
但是主目录是可以的哦。只是我绑定另外的网站才这样!
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-6-14 10:39:19 | 显示全部楼层



听说要写什么local,求指教
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-6-14 11:33:42 | 显示全部楼层

回复 2# 的帖子


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

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2011-6-14 15:27:52 | 显示全部楼层

问题解决了。。。。原来是在lnmpa上添加虚拟主机,哈哈。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-20 18:51 , Processed in 0.026693 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表