VPS侦探论坛

 找回密码
 注册
查看: 8487|回复: 3

带WWW与不带WWW访问的地址不一样

[复制链接]
发表于 2011-7-5 18:41:47 | 显示全部楼层 |阅读模式

添加了域名,添加之后,发现带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......
[warn]: 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......
[warn]: conflicting server name "girlsey.com" on 0.0.0.0:80, ignored
[error]: 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
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-7-5 20:00:18 | 显示全部楼层


girlsey.com已经添加过了,如果重新添加需要删除掉原来添加过的配置文件。而且nginx貌似没重启成功。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-7-5 21:42:21 | 显示全部楼层

原帖由 licess 于 2011-7-5 20:00 发表
girlsey.com已经添加过了,如果重新添加需要删除掉原来添加过的配置文件。而且nginx貌似没重启成功。

谢谢军哥的回复,是的,已经添加过了,但是访问出来的网页还是不一样?我今天重新添加删除了几次,www.girlsey.com与girlsey.com访问都是不一样。
打开内容页提示这个,说明是nginx没有重启成功?再网上找了。kill -HUP `cat /usr/local/nginx/nginx.pid`这个命令重启,还不行?那如何重启成功呢?
404 Not Foundnginx/0.8.54
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-7-6 06:53:31 | 显示全部楼层



已经添加过了,目录不一样肯定就是不一样的内容。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-15 09:53 , Processed in 0.026944 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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