Skip to content

Instantly share code, notes, and snippets.

@tonyseek
Created November 30, 2014 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonyseek/9dfb43a79574f609300d to your computer and use it in GitHub Desktop.
Save tonyseek/9dfb43a79574f609300d to your computer and use it in GitHub Desktop.
partial nginx config of my blog
server {
listen 80;
server_name blog.tonyseek.com;
root /srv/blog.tonyseek.com/;
# digg has a broken https support while sni extension has been enabled.
if ($http_user_agent !~ Digg ) {
rewrite ^ https://$server_name$request_uri? permanent; # enforce to use https
}
location /feed {
rewrite ^ /atom.xml permanent;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment