Skip to content

Instantly share code, notes, and snippets.

@AD7six
Created December 9, 2014 10:19
Show Gist options
  • Save AD7six/beffbfa657ed013e0591 to your computer and use it in GitHub Desktop.
Save AD7six/beffbfa657ed013e0591 to your computer and use it in GitHub Desktop.
DNS/hosts file changes to point sites I want to avoid interacting on to a server running nginx; using this config to prevent getting drawn into pointless debates/answering silly questions.
server {
listen 80;
server_name stackoverflow.com;
access_log /var/www/readonly.com/logs/access.log;
error_log /var/www/readonly.com/logs/error.log;
resolver 8.8.8.8 8.8.4.4 216.146.35.35 216.146.36.36;
location / {
proxy_pass http://$host;
proxy_set_header Host $host;
proxy_hide_header Set-Cookie;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment