Skip to content

Instantly share code, notes, and snippets.

@ThePixelDeveloper
Forked from shadowhand/vhost.conf
Created November 4, 2009 16:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThePixelDeveloper/226209 to your computer and use it in GitHub Desktop.
Save ThePixelDeveloper/226209 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$ {
# Do this! ;)
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; // Changed from $script to $fastcgi_script_name
include /opt/local/etc/nginx/fastcgi.conf;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment