天天看点

nginx 禁止通过IP,未绑定域名访问服务器

<a>http://game.mediabooknow.com/read-tid-3450152.html</a>

此域名指到 bbs.xxx.com 非法指向服务器。

  server

  {

    listen       80;

    server_name  bbs.xxx.com;

    index index.html index.htm index.php index.shtml;

    root  /home/bbs;

    if ($host !~ ^bbs\.xxx\.com$){

}

即可解决。还可以导入带来流量。

本文转自 liang3391 51CTO博客,原文链接:http://blog.51cto.com/liang3391/500713

继续阅读