Skip to content

Instantly share code, notes, and snippets.

@bawerd
Forked from marfillaster/defaults
Created February 21, 2012 10:42
Show Gist options
  • Save bawerd/1875727 to your computer and use it in GitHub Desktop.
Save bawerd/1875727 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