Question on rewriting ...

Rakhesh Sasidharan rakhesh at rakhesh.com
Sat Sep 8 10:22:00 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 again!

I figured why $document_root was behaving funny. I had set my root 
directive within the / location. Moving it above, to the server level, set 
$document_root correctly.

I also upgraded Nginx to 0.6.10 -- but still no go. I guess my server is 
spooked! :)

Regards,


 				- Rakhesh
                                 http://rakhesh.net/





More information about the nginx mailing list