Instalasi aplikasi berbasis symfony 1.4 di Nginx

server {

listen 80;

server_name amanah.negeripelangi.org;

access_log /home/negeripelangi/www/amanah/log/access.log;

error_log /home/negeripelangi/www/amanah/log/error.log;

root /home/negeripelangi/www/amanah/web;

index index.php;

charset utf-8;

location / {

# If the file exists as a static file serve it directly without

# running all the other rewite tests on it

if (-f $request_filename) {

expires max;

break;

}

if ($request_filename !~ "\.(js|htc|ico|gif|jpg|png|css)$") {

rewrite ^(.*) /index.php last;

}

}

location ~ \.php($|/) {

set $script $uri;

set $path_info "";

if ($uri ~ "^(.+\.php)(/.+)") {

set $script $1;

set $path_info $2;

}

fastcgi_pass unix:/var/run/php5-fpm.sock;

#fastcgi_pass 127.0.0.1:9000;

include /etc/nginx/fastcgi_params;

fastcgi_param SCRIPT_FILENAME /home/negeripelangi/www/amanah/web$script;

fastcgi_param PATH_INFO $path_info;

fastcgi_param SCRIPT_NAME $script;

}

}

Referensi