Set the default virtual host for Nginx (empty host header, default host header)

V Records 1,452 Views No comment

Nginx’s default virtual host takes effect when the user accesses it via IP or through an unset domain name (such as someone pointing his own domain name to your server’s ip

For example, when someone visits your website through ip or an unknown domain name, you want to disable the display of any valid content, you can return it to 500.

You can also collect these traffic and import it into your own website. Just make the following jump settings:


This article was first published by V on 2018-10-04 and can be reprinted with permission, but please be sure to indicate the original link address of the article :http://www.nginxer.com/records/set-the-default-virtual-host-for-nginx-empty-host-header-default-host-header/

Leave a Reply

Your email address will not be published. Required fields are marked *

Go