Nginx for Symfony
Aleksandar Lazic
al-nginx at none.at
Sat May 24 18:18:20 MSD 2008
Hi,
On Sam 24.05.2008 20:51, John Huong wrote:
> I would like to seek assistance with configuring nginx for a symfony
> project.
[snipp]
> Also how do I tell nginx to always load all references to the sf
> folder (e.g. /var/www/myproject/web/sf) to the symfony data folder?
I have this working setup:
###
server {
.
.
.
location / {
root /home/httpd/virtserver/<DOMAIN>/html;
if ($request_filename !~ "\.(js|htc|ico|gif|jpg|png|css|htm)$") {
rewrite ^(.*) /index.php last;
}
index index.html index.htm;
}
location /sf/ {
root /home/php/lib/php/data/symfony/web;
}
location ~ \.php($|/) {
set $script $uri;
set $path_info "";
if ($uri ~ "^(.+\.php)(/.+)") {
set $script $1;
set $path_info $2;
}
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/php/projects/symfony/web$script;
fastcgi_param PATH_INFO $path_info;
fastcgi_pass 127.0.0.1:8085;
}
}
###
Hth
Aleks
More information about the nginx
mailing list