Skip to content

Instantly share code, notes, and snippets.

@paramah
Created November 4, 2012 16:04
Show Gist options
  • Save paramah/4012425 to your computer and use it in GitHub Desktop.
Save paramah/4012425 to your computer and use it in GitHub Desktop.

Revisions

  1. paramah created this gist Nov 4, 2012.
    26 changes: 26 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    server {
    listen 80;
    server_name @@domain@@;
    access_log @@dir@@/access.log slim;
    error_log @@dir@@/error.log;

    location / {
    root @@dir@@;
    if (-f $request_filename) {
    expires 30d;
    break;
    }
    if (!-e $request_filename) {
    rewrite ^(.+)$ /index.php?q=$1 last; #=
    }
    index index.html index.php;
    }

    location ~ \.php$ {
    include /usr/local/etc/nginx/fastcgi_params;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME @@dir@@$fastcgi_script_name;

    }
    }