Skip to content

Instantly share code, notes, and snippets.

@joseadrian
Forked from mishak87/ip.conf
Created October 28, 2015 05:25
Show Gist options
  • Save joseadrian/bfb9077b789782124657 to your computer and use it in GitHub Desktop.
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 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