Skip to content

Instantly share code, notes, and snippets.

@azhtom
Last active August 29, 2015 14:15
Show Gist options
  • Save azhtom/8b0169a97f96872485f0 to your computer and use it in GitHub Desktop.
Save azhtom/8b0169a97f96872485f0 to your computer and use it in GitHub Desktop.
(NGINX) NON-WWW TO WWW
server {
listen 80;
server_name example.com;
return 301 http://www.example.com$request_uri;
}
server {
listen 80;
server_name www.example.com;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment