全球主机交流论坛

标题: LNMP重定向出现问题了,求高手帮忙,急啊!!!! [打印本页]

作者: hexiaojun    时间: 2011-9-8 13:33
标题: LNMP重定向出现问题了,求高手帮忙,急啊!!!!
我的网站www.cityhg.com,本来做了个论坛也放在/home/wwwroot/bbs目录,但是为了和主站直接有数据交换方便,把论坛移到/home/wwwroot/cityhg/bbs了,修改了bbs.cityhg.com.conf,但是突然网站全部不能访问了,我的论坛是开了伪静态的,没办法,删除了论坛数据、论坛域名文件、伪静态配置文件,重启VPS可以发现网站还是打不开,求帮忙,非常感谢!!!!
作者: hexiaojun    时间: 2011-9-8 13:35
=========================================================================
Manager for LNMP V0.7  ,  Written by Licess
=========================================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to Manage status of lnmp
For more information please visit http://www.lnmp.org

Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Reload LNMP...
Reload Nginx configure...
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful
Nginx program is reloding!
SUCCESS! Reloading service MySQL
Reload service php-fpm  done
[root@cityhg vhost]# /root/lnmp restart
=========================================================================
Manager for LNMP V0.7  ,  Written by Licess
=========================================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to Manage status of lnmp
For more information please visit http://www.lnmp.org

Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Stoping LNMP...
Nginx program is stop
Shutting down php_fpm  done
PHP-FPM program is stop
Shutting down MySQL. SUCCESS!
MySQL program is stop
Starting LNMP...
[warn]: conflicting server name "www.cityhg.com" on 0.0.0.0:80, ignored
[warn]: conflicting server name "cityhg.com" on 0.0.0.0:80, ignored
Nginx start successfully!
Starting php_fpm Failed loading /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so:  /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so: cannot open shared object file: No such file or directory
done
PHP-FPM start successfully!
Starting MySQL. SUCCESS!
MySQL start successfully!
[root@cityhg vhost]# /root/lnmp reload
=========================================================================
Manager for LNMP V0.7  ,  Written by Licess
=========================================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to Manage status of lnmp
For more information please visit http://www.lnmp.org

Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Reload LNMP...
Reload Nginx configure...
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful
Nginx program is reloding!
SUCCESS! Reloading service MySQL
Reload service php-fpm  done
作者: ls2829373    时间: 2011-9-8 13:39
伪静态文件有问题? 折腾吧
作者: 飞天金猪    时间: 2011-9-8 13:39
重新绑定域名bbs到/home/wwwroot/cityhg/bbs 重启
作者: hexiaojun    时间: 2011-9-8 14:22
多些飞天金猪的帮助,不过我试了您说的方法,还是没有好
请问还有朋友能帮下忙吗?
作者: cpuer    时间: 2011-9-8 14:24
bbs.cityhg.com.conf 里面的server规则发来看看
作者: hexiaojun    时间: 2011-9-8 14:36
我直接删除了bbs.cityhg.com.conf
作者: 小陈    时间: 2011-9-8 14:37
   偶是小白~
作者: 鸭梨很大    时间: 2011-9-8 14:41
提示: 作者被禁止或删除 内容自动屏蔽
作者: hexiaojun    时间: 2011-9-8 14:41
现在就求我的主网站www能保住,唉
作者: hexiaojun    时间: 2011-9-8 14:59
不要沉啊,有能帮忙的希望加下我QQ:97622019,在线等
作者: hexiaojun    时间: 2011-9-8 15:18
求帮忙的,实在没有办法了,看来以后不能折腾了
作者: hexiaojun    时间: 2011-9-8 15:26
网站检测了下,返回是这样的
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/0.8.54</center>
</body>
</html>
作者: won.cc    时间: 2011-9-8 15:39
www.cityhg.com.conf配置文件发上来。
作者: hexiaojun    时间: 2011-9-8 15:55
  1. server
  2.         {
  3.                 listen       80;
  4.                 server_name www.cityhg.com cityhg.com;
  5.                 index index.html index.htm index.php default.html default.htm default.php;
  6.                 root  /home/wwwroot/www.cityhg.com;
  7.                

  8.                 include cityhg.conf;
  9.                 location ~ .*\.(php|php5)?$
  10.                         {
  11.                                 fastcgi_pass  unix:/tmp/php-cgi.sock;
  12.                                 fastcgi_index index.php;
  13.                                 include fcgi.conf;
  14.                         }

  15.                 location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  16.                         {
  17.                                 expires      30d;
  18.                         }

  19.                 location ~ .*\.(js|css)?$
  20.                         {
  21.                                 expires      12h;
  22.                         }

  23.                 access_log off;
  24.         }
复制代码

作者: hexiaojun    时间: 2011-9-8 15:55
  1. server
  2.         {
  3.                 listen       80;
  4.                 server_name www.cityhg.com cityhg.com;
  5.                 index index.html index.htm index.php default.html default.htm default.php;
  6.                 root  /home/wwwroot/www.cityhg.com;
  7.                

  8.                 include cityhg.conf;
  9.                 location ~ .*\.(php|php5)?$
  10.                         {
  11.                                 fastcgi_pass  unix:/tmp/php-cgi.sock;
  12.                                 fastcgi_index index.php;
  13.                                 include fcgi.conf;
  14.                         }

  15.                 location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  16.                         {
  17.                                 expires      30d;
  18.                         }

  19.                 location ~ .*\.(js|css)?$
  20.                         {
  21.                                 expires      12h;
  22.                         }

  23.                 access_log off;
  24.         }
复制代码

作者: won.cc    时间: 2011-9-8 16:03
找到了问题,已解决;旧配置文件重复加载导致,很多人忽略了nginx.conf的配置 include vhost/*.conf;

误以为配置文件改名了,就不会加载了,而没有修改扩展名.conf,这个是不熟悉配置的朋友经常犯的错误之一。
作者: hexiaojun    时间: 2011-9-8 16:07
希望大家不要犯和我相同的错误哦,conf文件要备份最好直接下载备份到本地或者网盘,或者改成.txt,感谢won.cc 的无私帮助
作者: hotdojo    时间: 2011-9-8 16:08
经验帖  MARK
作者: jacksoking    时间: 2011-9-8 16:12
原帖由 hotdojo 于 2011-9-8 16:08 发表
经验帖  MARK

mark +1
作者: 有个就好    时间: 2011-9-8 16:28
马克一下
作者: czc111222    时间: 2011-9-8 21:04
马克




欢迎光临 全球主机交流论坛 (https://sunk.eu.org/) Powered by Discuz! X3.4