nginx的server_name

  sre

*通配符:

server {
     listen       80;
     server_name  *.domain.com;
     #server_name  www.*;
     #server_name  ~^(?.+)\.domain\.com$;
     ...
}

default_server:

server {
    listen  80   default_server;
    listen 443 ssl default_server;
    #通过返回444这个nginx的非标准错误码让nginx断开与浏览器的连接
    server_name  _;    return 444;
}

LEAVE A COMMENT

Captcha Code