Skip to content

Instantly share code, notes, and snippets.

@christophermancini
Created August 21, 2014 00:08
Show Gist options
  • Save christophermancini/56a4f5a4069143b13dc9 to your computer and use it in GitHub Desktop.
Save christophermancini/56a4f5a4069143b13dc9 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name whatever.com www.whatever.com;
root /var/www/whatever;
location /admin {
if ( $scheme !~ https ) {
return 301 https://www.whatever.com$request_uri;
}
}
location / {
# This is cool because no php is touched for static content
try_files $uri $uri/ @rewrites;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment