Skip to content

Instantly share code, notes, and snippets.

@CarterA
Created September 19, 2010 07:26
Show Gist options
  • Select an option

  • Save CarterA/586523 to your computer and use it in GitHub Desktop.

Select an option

Save CarterA/586523 to your computer and use it in GitHub Desktop.
server {
set $user carterallen;
set $site zcr.me;
server_name $site;
root /home/$user/sites/$site/public;
access_log /home/$user/sites/$site/logs/access.log main;
location / {
try_files $uri $uri/ /index.php?id=$request_uri;
}
error_page 404 /errors/404.html;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment