VPS侦探论坛

 找回密码
 注册
查看: 7305|回复: 6

急求助,带www的域名访问不了,不带的可以访问?

[复制链接]
发表于 2012-10-23 20:54:22 | 显示全部楼层 |阅读模式

我用的是阿里云,装的是lnmp,我绑定了好几个域名,其他三个都是访问的,jsfc.co  www.licaiya.net licaiya.net这三个是可以访问的,不知道为什么?
就是www.jsfc.co这个不可以,
而且域名解析四个都是同一个ip的。
下面是配置文件/usr/local/nginx/conf/vhost/www.jsfc.co.conf

server
{
    listen       80;
    server_name www.jsfc.co jsfc.co www.licaiya.net licaiya.net;
    index index.html index.htm index.php default.html default.htm default.php;
    root  /home/wwwroot/jsfc;
我看了这篇文章,但是没有看明白https://bbs.vpser.net/thread-8631-1-5.html

[ 本帖最后由 fzx126 于 2012-10-23 21:26 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-10-23 21:26:31 | 显示全部楼层


/usr/local/nginx/sbin/nginx -t 测试看看
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-10-23 21:28:47 | 显示全部楼层

[root@AY121021080744 vhost]# /usr/local/nginx/sbin/nginx -t
nginx: [warn] conflicting server name "www.jsfc.co" on 0.0.0.0:80, ignored
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-10-23 21:43:27 | 显示全部楼层



军哥,是不是我的文件有权限问题啊?我今天用ftp上传的
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-10-23 23:41:48 | 显示全部楼层

对下面文件修改,
/usr/local/nginx/conf/vhost/www.jsfc.co.conf       server_name jsfc.co;
/usr/local/nginx/conf/nginx.conf                              server_name www.jsfc.co;

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

发表于 2012-10-24 08:53:23 | 显示全部楼层

"www.jsfc.co" 这个域名添加过2次,检查配置将多添加的这个去掉就行了
 楼主| 发表于 2012-10-24 19:10:18 | 显示全部楼层

回复 6# 的帖子


是的,参照5楼和你的意见解决了。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-23 23:34 , Processed in 0.028314 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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