Trailing slash rewrite help
Igor Sysoev
is at rambler-co.ru
Tue Jul 21 13:22:29 MSD 2009
On Mon, Jul 20, 2009 at 11:14:06AM -0400, Kurt Hansen wrote:
>
> 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.
It should work, what do you see when you request "/" or "/action/" ?
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list