Skip to content

Instantly share code, notes, and snippets.

@mishak87
Created April 23, 2014 01:39
Show Gist options
  • Save mishak87/11200193 to your computer and use it in GitHub Desktop.
Save mishak87/11200193 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;
}
@Sarfroz
Copy link

Sarfroz commented Aug 20, 2016

hello sir i have small confusion i am sure you will help me to figure it out 🍡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment