balling 发表于 2013-4-16 09:36:50

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

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

先安装了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. 另外两个虚拟主机的配置文件都没显示。

在本机上pingabc.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_passunix:/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_passunix:/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;

}

licess 发表于 2013-4-16 12:49:48

nginx -t没错误就是没问题

无法ping这个可能是vps上设置了禁止ping 或服务商禁ping了
页: [1]
查看完整版本: 绑定二级域名失败,ping不通