设置nginx防止别人的域名绑定你的主机

来源:互联网 发布:最佳适应算法例题 编辑:程序博客网 时间:2024/04/26 16:13

在http{节中加如下配置:

 

可以转向到你想转的域名:

   server {

   listen 80 default;

   rewrite ^(.*) http://163.com permanent;

   }

 

也可返回错误:

   server {

   listen 80 default;

   return 500;

   }

原创粉丝点击