Skip to content

Instantly share code, notes, and snippets.

@duonoid
Created May 20, 2010 23:14
Show Gist options
  • Save duonoid/408252 to your computer and use it in GitHub Desktop.
Save duonoid/408252 to your computer and use it in GitHub Desktop.
/etc/nginx# cat canonical_hostname
if ($host != $server_name) {
rewrite ^(.*)$ $scheme://$server_name$1 permanent;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment