Skip to content

Instantly share code, notes, and snippets.

Created November 4, 2009 16:53
Show Gist options
  • Save anonymous/226206 to your computer and use it in GitHub Desktop.
Save anonymous/226206 to your computer and use it in GitHub Desktop.
# default server
server {
listen 80;
server_name local.kohanaphp.com;
root /Volumes/Webserver/Checkout/projects/kohana/v3;
location / {
index index.php index.html index.htm;
try_files $uri $uri/ index.php$uri;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /opt/local/share/nginx/html;
}
location ~ \.php($|/) {
set $script index.php;
set $path_info "";
if ($uri ~ "^(.+\.php)(/.*)") {
set $script $1;
set $path_info $2;
}
fastcgi_param PATH_INFO $path_info;
include /opt/local/etc/nginx/fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/$script;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment