VPS侦探论坛

 找回密码
 注册
查看: 4631|回复: 1

绑定二级域名失败,ping不通

[复制链接]
发表于 2013-4-16 09:36:50 | 显示全部楼层 |阅读模式

问题如标题,整个流程是这样的,拜谢各位了!

先安装了lnmp,绑定了域名  www.abc.com,一切正常,这是安装lnmp的时候,直接在nginx.conf里面配置的;

接着又参照lnmp.org的教程绑定了虚拟主机 abc.com,指向和  www.abc.com同一个目录;还有blog.abc.com,指向新的目录;

运行/usr/local/nginx/conf/vhost/, 出现 abc.com.conf  和 blog.abc.com.conf 两个问题。

运行 /usr/local/nginx/sbin/nginx -t  显示 nginx.conf syntax is ok, test is successful. 另外两个虚拟主机的配置文件都没显示。

在本机上ping  abc.com 和 blog.abc.com 都ping不通,可能是什么原因呢?


blog.abc.com.conf 内容如下:

server

{

listen       80;

server_name blog.abc.com;

index index.html index.htm index.php default.html default.htm default.php;

root  /home/wwwroot/Blog;


include none.conf;

location ~ .*\.(php|php5)?$

{

try_files $uri =404;

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;

}


abc.com.conf 内容如下:

server

{

listen       80;

server_name abc.com;

index index.html index.htm index.php default.html default.htm default.php;

root  /home/wwwroot/abc;


include none.conf;

location ~ .*\.(php|php5)?$

{

try_files $uri =404;

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;

}
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2013-4-16 12:49:48 | 显示全部楼层


nginx -t没错误就是没问题

无法ping这个可能是vps上设置了禁止ping 或服务商禁ping了
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-24 11:24 , Processed in 0.025549 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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