symfony php configuration

Igor Sysoev is at rambler-co.ru
Sat May 23 19:20:58 MSD 2009


On Sat, May 23, 2009 at 01:12:49PM +0200, Mikel Arteta wrote:

> > Igor Sysoev wrote:
> > You did not set
> > 
> > fastcgi_param  SCRIPT_FILENAME  /path/to/php$fastcgi_script_name;
> > 
> > and some other probably needed parameters inside
> >  location ~ \.php$ {
> > and
> >  location ~ ^(.+\.php)(.*)$ {
> Yet I have the settings in the file fastcgi_params, includes nginx.conf:
> 
> -------------
> 
> events {
>     worker_connections  1024;
>     use epoll;}
> 
> http {
> ...
> ...
> ...
>     include fastcgi_params;
> 
> ---------------
> 
> k26:nginx/conf# cat fastcgi_params
> 
> fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
> fastcgi_param  PATH_INFO          $request_uri;
> fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
> fastcgi_param  REQUEST_URI        $request_uri;
> fastcgi_param  DOCUMENT_URI       $document_uri;
> fastcgi_param  DOCUMENT_ROOT      $document_root;
> 
> -----------------

The silnge
    fastcgi_param  PATH_INFO        $fastcgi_path_info;
overrides all inherited fastcgi_param's. Threfore you should include it
inside "location ~ ^(.+\.php)(.*)$".

Also, note wrong
   fastcgi_param  PATH_INFO          $request_uri;
in the file.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list