Welcome! Log In Create A New Profile

Advanced

symfony php configuration

April 29, 2009 11:21AM
Hi all.

In a previous post, Igor says:

"If you have "if ($uri" in configuration, this means that your configuraiton
is far from optimal and has hidden agendas."

I'm using nginx + phpfpm + symfony framework and it's working fine.

I take my configuration from this list, from an older post related to symfony.

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 /sf/ {
root /usr/share/pear/data/symfony/web/;
}


location ~ \.php($|/) {
set $script $uri;
set $path_info "";

if ($uri ~ "^(.+\.php)(/.+)") {
set $script $1;
set $path_info $2;
}

fastcgi_pass 127.0.0.1:9000;

include /usr/local/nginx/conf/fastcgi_params;

fastcgi_param PATH_INFO $path_info;
fastcgi_param SCRIPT_FILENAME $document_root$script;
fastcgi_param SCRIPT_NAME $script;
}

Please, is there a more optimal configuration without "if $uri", using try_files ?

Thanks in advance.
Subject Author Posted

symfony php configuration

shaktale April 29, 2009 11:21AM

Re: symfony php configuration

Joe Bofh April 30, 2009 06:58PM

Re: symfony php configuration

shaktale May 05, 2009 04:29AM

Re: symfony php configuration

shaktale May 14, 2009 07:52AM

Re: symfony php configuration

Igor Sysoev May 14, 2009 08:02AM

Re: symfony php configuration

shaktale May 18, 2009 04:52AM

WEB Service based on Nginx

Zheng, Wenxing (NSN - CN/Beijing) May 20, 2009 02:26AM

Re: WEB Service based on Nginx

deltay May 20, 2009 02:36AM

Re: symfony php configuration

Mikel Arteta May 22, 2009 03:19PM

Re: [!! SPAM] Re: symfony php configuration

Igor Sysoev May 22, 2009 03:52PM

Re: Re: symfony php configuration

Mikel Arteta May 23, 2009 07:12AM

Re: Re: symfony php configuration

Igor Sysoev May 23, 2009 11:20AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 282
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready