Skip to content

Instantly share code, notes, and snippets.

@christophermancini
Created August 21, 2014 00:08
Show Gist options
  • Select an option

  • Save christophermancini/56a4f5a4069143b13dc9 to your computer and use it in GitHub Desktop.

Select an option

Save christophermancini/56a4f5a4069143b13dc9 to your computer and use it in GitHub Desktop.

Revisions

  1. Christopher Mancini created this gist Aug 21, 2014.
    16 changes: 16 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    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;
    }
    }