Trailing slash rewrite help
Kurt Hansen
khansen at charityweb.net
Mon Jul 20 19:14:06 MSD 2009
Igor Sysoev wrote:
> On Sat, Jul 18, 2009 at 01:28:12AM -0400, Kurt Hansen wrote:
>
>> Hello,
>>
>> I'm using nginx as a reverse proxy to a mod_perl backend server and am
>> having trouble with my rewrite rule in the case of a missing trailing
>> slash on a subdirectory.
>>
>> For example, I want
>>
>> www.example.com/action mapped to the example/action/ directory on the
>> mod_perl server.
>>
>>
>>
>
> Probably, you need just:
>
> location / {
> proxy_pass http://cweb/example/;
> }
>
> Also, you need to set "Index index.htm" on mod_perl side.
>
>
Thanks, Igor, that did the trick!
Thought I was missing something simple...
Key, too, was getting the mod_perl server to specify the index.htm
rather than the nginx server. I used a rewrite rule to do that because
my apache/mod_perl with HTML::Mason setup doesn't handle the
DirectoryIndex quite right.
Take care,
Kurt
More information about the nginx
mailing list