Skip to content

Instantly share code, notes, and snippets.

@yassine-khachlek
Created October 11, 2018 05:21
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 yassine-khachlek/89532bbb0d1063f998f45216cb26db17 to your computer and use it in GitHub Desktop.
Save yassine-khachlek/89532bbb0d1063f998f45216cb26db17 to your computer and use it in GitHub Desktop.
/etc/nginx/conf.d
server {
listen 80;
server_name example.com;
return 301 $scheme://www.example.com$request_uri;
}
server {
listen 80 default_server;
server_name *.example.com;
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment