带WWW与不带WWW访问的地址不一样
添加了域名,添加之后,发现带WWW与不带WWW访问的地址不一样,删除虚拟机,重新添加,搞好多次都不行。特来求助一下。这个是我的网站www.girlsey.com
localhost:~# /root/vhost.sh
=========================================================================
Add Virtual Host 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 add virtual host for nginx
For more information please visit http://www.lnmp.org/
=========================================================================
Please input domain:
(Default domain: www.lnmp.org):girlsey.com
===========================
domain=girlsey.com
===========================
Do you want to add more domain name? (y/n)
y
Type domainname,example(bbs.vpser.net forums.vpser.net luntan.vpser.net):
www.girlsey.com
===========================
domain list=www.girlsey.com
===========================
Please input the directory for the domain:girlsey.com :
(Default directory: /home/wwwroot/girlsey.com):/home/wwwroot/girlsey.com
===========================
Virtual Host Directory=/home/wwwroot/girlsey.com
===========================
===========================
Allow Rewrite rule? (y/n)
===========================
y
Please input the rewrite of programme :
wordpress,discuz,typecho,sablog,dabr rewrite was exist.
(Default rewrite: other):wrodpress
===========================
You choose rewrite=wrodpress
===========================
===========================
Allow access_log? (y/n)
===========================
n
Press any key to start create virtul host...
Create Virtul Host directory......
set permissions of Virtual Host directory......
Create Virtul Host ReWrite file......
Create rewirte file successful,now you can add rewrite rule into /usr/local/nginx/conf/wrodpress.conf.
Test Nginx configure file......
: conflicting server name "girlsey.com" on 0.0.0.0:80, ignored
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful
Restart Nginx......
: conflicting server name "girlsey.com" on 0.0.0.0:80, ignored
: invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
=========================================================================
Add Virtual Host for LNMP V0.7,Written by Licess
=========================================================================
For more information please visit http://www.lnmp.org/
Your domain:girlsey.com
Directory of girlsey.com:/home/wwwroot/girlsey.com
girlsey.com已经添加过了,如果重新添加需要删除掉原来添加过的配置文件。而且nginx貌似没重启成功。 原帖由 licess 于 2011-7-5 20:00 发表 https://bbs.vpser.net/images/common/back.gif
girlsey.com已经添加过了,如果重新添加需要删除掉原来添加过的配置文件。而且nginx貌似没重启成功。
谢谢军哥的回复,是的,已经添加过了,但是访问出来的网页还是不一样?我今天重新添加删除了几次,www.girlsey.com与girlsey.com访问都是不一样。
打开内容页提示这个,说明是nginx没有重启成功?再网上找了。kill -HUP `cat /usr/local/nginx/nginx.pid`这个命令重启,还不行?那如何重启成功呢?
404 Not Foundnginx/0.8.54 已经添加过了,目录不一样肯定就是不一样的内容。
页:
[1]