Nginx drop when server_name does not match

后端 未结 1 1869
庸人自扰
庸人自扰 2020-12-11 08:26

I have two vhosts : one on domain.tld port 80, the other on sub.domain.tld port 443 with SSL on. I added a CNAME entry on my DNS server that redire

相关标签:
1条回答
  • 2020-12-11 09:12

    If these are your only server blocks, then they are also your defacto default server blocks for port 443 and port 80 respectively. See this document for details.

    If you do not want this, you need to declare a default server block. A minimalist definition might be:

    server {
        listen 80 default_server;
        listen 443 default_server;
        deny all;
    }
    
    0 讨论(0)
提交回复
热议问题