5 messages in ru.sysoev.nginxRe: Trailing slash rewrite help
FromSent OnAttachments
Kurt HansenJul 17, 2009 10:27 pm 
Igor SysoevJul 18, 2009 12:24 am 
Kurt HansenJul 20, 2009 8:13 am 
Igor SysoevJul 21, 2009 2:22 am 
Kurt HansenJul 21, 2009 7:06 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Trailing slash rewrite helpActions...
From:Kurt Hansen (khan@charityweb.net)
Date:Jul 20, 2009 8:13:43 am
List:ru.sysoev.nginx

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