Skip to content

Instantly share code, notes, and snippets.

@cursedcoder
Created October 13, 2011 19:10
Show Gist options
  • Save cursedcoder/1285198 to your computer and use it in GitHub Desktop.
Save cursedcoder/1285198 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name poli.gon;
root /usr/local/www/poli.gon/web;
index app_dev.php index.html index.htm;
try_files $uri $uri/ @rewrite;
location ~* \.(jpg|jpeg|gif|png|ico|css|zip|js|swf|txt)$ {
#root /usr/local/www/poli.gon/web;
}
location @rewrite {
rewrite ^/(.*)$ /app_dev.php/$1;
}
location ~ \.php {
# try_files $uri =404;
fastcgi_index app_dev.php;
fastcgi_pass 127.0.0.1:8000;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment