Skip to content

Instantly share code, notes, and snippets.

@qianduan
Last active December 3, 2015 03:43
Show Gist options
  • Save qianduan/ce2fad031c73bf17499f to your computer and use it in GitHub Desktop.
Save qianduan/ce2fad031c73bf17499f to your computer and use it in GitHub Desktop.
nginx redrect to https used for www.qianduan.net
server {
listen 80;
server_name qianduan.net www.qianduan.net;
//don't want to use https://qianduan.net, so, derect any http url to https.
return 301 https://www.qianduan.net$request_uri;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment