Skip to content

Instantly share code, notes, and snippets.

@terinjokes
Created June 12, 2013 18:24
Show Gist options
  • Save terinjokes/5767795 to your computer and use it in GitHub Desktop.
Save terinjokes/5767795 to your computer and use it in GitHub Desktop.
nginx configuration to return 404 for all pages with content.
server {
listen 80 default_server;
server_name _;
location / {
return 404
}
location /404.html {
root /var/www/default/htdocs;
}
error_page 404 /404.html
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment