Skip to content

Instantly share code, notes, and snippets.

@marfillaster
Created March 21, 2011 12:20
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save marfillaster/879378 to your computer and use it in GitHub Desktop.
Save marfillaster/879378 to your computer and use it in GitHub Desktop.
location = /favicon.ico {
log_not_found off;
access_log off;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
location ~ /\.ht {
deny all;
}
location ~ \.php($|/) {
include fastcgi_params;
set $script $uri;
set $path_info "";
if ($uri ~ "^(.+\.php)($|/)") {
set $script $1;
}
if ($uri ~ "^(.+\.php)(/.+)") {
set $script $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_NAME $script;
fastcgi_param PATH_INFO $path_info;
}
server {
server_name symfony-se.local;
root /playground/symfony-se/web;
index app.php; #for production frontend
location / {
try_files $uri $uri/ /app.php;
}
include defaults;
include defaults-symfony;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment