PHP, Apache, Mongrel cluster

Stefanita rares Dumitrescu lists at ruby-forum.com
Fri Jan 25 19:44:19 MSK 2008


Thomas wrote:
> Hi,
> 
> In my PHP+nginx combo, I have a little problem.
> 
> Let's say I have phpmyadmin installed in /var/www/phpmyadmin,
> 
> in nginx.conf I must specify fastcgi_param  SCRIPT_FILENAME
> /var/www/phpmyadmin$fastcgi_script_name;
> 
> I tried using fastcgi_param  SCRIPT_FILENAME
> $document_root$fastcgi_script_name;
> 
> but it doesn't work. In the browser I get a "no input file specified".
> 
> How to solve this issue. I know it's meaningless, but it's annoying to
> have to remember to change the SCRIPT_FILENAME each time I move or
> rename my php apps directory.

change location to /

        location / {
                    fastcgi_pass   localhost:8000;
                    fastcgi_index  get;

                    fastcgi_param  SCRIPT_FILENAME 
/home/fs01/www$fastcgi_script_name;
                    fastcgi_param  SCRIPT_NAME 
$fastcgi_script_name;
                    fastcgi_param  REQUEST_URI      $request_uri;
                    fastcgi_param  QUERY_STRING     $query_string;
                    fastcgi_param  REQUEST_METHOD   $request_method;
                    fastcgi_param  CONTENT_TYPE     $content_type;
                    fastcgi_param  CONTENT_LENGTH   $content_length;

this makes all php requests to go to the fastcgi daemon.
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list