-
-
Save joseadrian/bfb9077b789782124657 to your computer and use it in GitHub Desktop.
Nginx: Support only requests with Host header (disable access via bare IP)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this file blocks ip requests - only request with Host are supported | |
server { | |
listen 80 default_server; | |
listen 443 default_server ssl; | |
server_name _; | |
return 444; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment