On Apr 24, 1:04 pm, Chris Miles <[EMAIL PROTECTED]> wrote:
> On Apr 24, 8:36 am, Chris Miles <[EMAIL PROTECTED]> wrote:
>
> > I haven't tried usingmod_proxyinstead, I will give that a go. Thanks
> > Jorge.
>
> OK, I got this working, the important part of the equation is the
> ProxyPassReverse directive. Redirection working correctly is
> extremely sensitive to the configuration, you have to get it exactly
> right. Here's what you need, for reference:
>
> Apache:
>
> <VirtualHost _default_:443>
> ProxyRequests Off # optional: for safety
> ProxyPass /myapp/http://127.0.0.1:8080/
> ProxyPassReverse /myapp/http://127.0.0.1:8080/
> # Of course, all the other directives for SSL, etc would be included
if server.webpath="/myapp"
then
ProxyPass /myapp/ http://127.0.0.1:8080/myapp/
ProxyPassReverse /myapp/ http://127.0.0.1:8080/myapp/
It works for me
> too
> </VirtualHost>
>
> Note that ProxyPass can be replaced with RewriteRule, they both work
> equally well with ProxyPassReverse. ie:
>
> RewriteEngine On
> RewriteRule ^/myapp/(.*)http://127.0.0.1:8080/$1[L,P]
> ProxyPassReverse /myapp/http://127.0.0.1:8080/
>
> Of course, ProxyPass looks neater. But RewriteRule may be useful for
> custom rules.
>
> It is important also to note that you must not enable
> "ProxyPreserveHost on" as this confuses the issue and redirects do not
> work properly if it is used.
>
> On the TurboGears side, you don't actually have to do anything other
> than:
>
> server.webpath="/myapp"
>
> which is only needed if you are mounting the application at a
> different virtual path to where TG thinks it is located. Leave all
> the other "base_url_filter" options disabled.
>
> Cheers,
> Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---