Question on rewriting ...
Rakhesh Sasidharan
rakhesh at rakhesh.com
Sat Sep 8 09:27:31 MSD 2007
Maxim Dounin wrote:
> Hello!
>
> On Fri, 7 Sep 2007, Rakhesh Sasidharan wrote:
>
> [...]
>>> With this config, it returns rss feed for /feed/rss, atom feed for
>>> /feed/atom, and rss feed again for /feed/no-such-feed. Looks like what you
>>> are trying to achive.
>>>
>>> Versions: WordPress 2.2.2, nginx 0.6.10.
>>
>> Yup, that's exactly what I want to achieve. Cool!
>>
>> In my config, SCRIPT_FILENAME is set to
>> /path/to/wordpress/$fastcgi_script_name. I didn't test out by changing it
>> to $document_root/$fastcgi_script_name, will do once I get back to that
>> machine.
>>
>> Why would changing SCRIPT_FILENAME to the latter make a difference btw? My
>> understanding is that $document_root points to the directive root of the
>> current request, shouldn't that be /path/to/wordpress anyways? Or am I
>> missing something?
>
> SCRIPT_FILENAME should point to wordpress php script to run, exact syntax
> before variable substitution doesn't matter. I've just bored typing and so
> used $document_root as a shortcut.
Hello!
I had a go at this, and it doesn't work. :-(
First of all, when I replaced SCRIPT_FILENAME with
$document_root$fastcgi_script_name, it started looking for the wordpress
files in /usr/local/etc/nginx/html (this is on FreeBSD and that's where
Nginx looks for its file by default). Dunno where it started taking that
from suddenly! I don't mention this location anywhere in my config files,
so it must be getting set elsewhere ...
Since you say that shouldn't matter, I'll ignore it for now.
I am on Nginx 0.5.31, while you are on 0.6.10. Would that make a
difference?
Regards,
- Rakhesh
http://rakhesh.net/
More information about the nginx
mailing list