PHP, Apache, Mongrel cluster

Thomas iamkenzo at gmail.com
Sat Jan 26 13:38:51 MSK 2008


That's what I alreay have, but based on this documentation:
http://wiki.codemongers.com/NginxFcgiExample, "To use Nginx + Virtual
Host + PHP you should ommit the SCRIPT_NAME variable in order for PHP
to choose the correct DOCUMENT_ROOT."

it seems that you can replace /home/fs01/www with $document_root, that
would save me some time and headaches when renaming a folder.

But probably I am wasting time on an insignificant improvement.

On Jan 25, 2008 5:44 PM, Stefanita rares Dumitrescu
<lists at ruby-forum.com> wrote:
> 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