标题: 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
server
{
listen 80;
server_name www.cityhg.com cityhg.com;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/www.cityhg.com;
include cityhg.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;
}
复制代码
作者: hexiaojun 时间: 2011-9-8 15:55
server
{
listen 80;
server_name www.cityhg.com cityhg.com;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/www.cityhg.com;
include cityhg.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;
}
复制代码
作者: won.cc 时间: 2011-9-8 16:03
找到了问题,已解决;旧配置文件重复加载导致,很多人忽略了nginx.conf的配置 include vhost/*.conf;