Skip to content

Instantly share code, notes, and snippets.

@shovon
Created January 10, 2014 17:45
Show Gist options
  • Save shovon/8359005 to your computer and use it in GitHub Desktop.
Save shovon/8359005 to your computer and use it in GitHub Desktop.
Nginx server settings, where only requests to example.com will be processed, and everything else will simply result in a no response.
server {
listen 80 default_server;
return 444;
}
server {
listen 80;
server_name example.com;
root /var/www/example.com;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment