Alias does not work with php
Valentin V. Bartenev
ne at vbart.ru
Sat Dec 17 17:11:58 UTC 2011
On Saturday 17 December 2011 18:58:59 tapir wrote:
> I've added "fastcgi_param SCRIPT_FILENAME
> $document_root/wordpress$fastcgi_script_name;"
> and now it works.
>
> As you might predict "$document_root/wordpress" is the alias for
> "location /".
> So what's the correct way of doing this? I mean I have other aliases as
> well and I would like php to work with those also.
>
Why don't you just use the "root" directive?
root /patch/to/wordpress;
location / {
...
}
and respectively:
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
wbr, Valentin V. Bartenev
More information about the nginx
mailing list