httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Brodbelt <m.brodb...@acu.ac.uk>
Subject Apache, mod_proxy, and Apache::AuthTicket
Date Tue, 09 Jul 2002 14:52:51 GMT
Zac Stevens wrote:


>>This setup almost works, but not quite. When I request a protected URL,
>>like http://frontendserver/foo, this is passed to the name based vhost
>>on the mod_perl server. This server notices that foo corresponds to a
>>directory, adds a trailing slash, and redirects the browser.
>>Unfortunately, it issues a redirect to http://backendserver:81/foo/ -
>>this of course fails, as the client is blocked from connecting to
>>http://backendserver:81 by the firewall.
>  
> From the sounds of things, you're looking for the ProxyPassReverse
> directive.
> 
> http://httpd.apache.org/docs/mod/mod_proxy.html#proxypassreverse

Lokked hopeful, but doesn't appear to work. When I request
http://frontendserver/foo at the moment, the request gets passed to the
mod_perl server. At that stage, Apache::AuthTicket issues a 403
forbidden, followed by an error document (which is the login form). When
the form is submitted I get a bogus redirect to
http://backendserver:81/foo/ - which promptly fails as the client can't
connect to the back end mod_perl server directly.

The Apache::AuthTicket module uses the redirect method supplied by
Apache::Constants, which seems to issue redirects based on the server
name in the <VirtualHost> directive. As such, it's issuing redirects to
the wrong place.

Now, I'd have thought that my ProxyPassReverse directive would have
rewritten those redirects, but it doesn't seem to be happening.

> If that's not the case, it would be helpful to include the section of your
> configuration responsible for doing the proxying.

Here's the Virtual Host configuration for the front end server. I've
replaced the actual names with frontendserver and backendserver in an
attempt to clarify (any anonymize) things.

<VirtualHost 192.168.1.8>
    ServerName frontendserver
    DocumentRoot /usr/local/sites/test/htdocs
    <Directory /usr/local/sites/test/htdocs>
       Options Indexes FollowSymLinks Includes
    </Directory>

  ErrorLog /var/httpd_docs/logs/error_log
  CustomLog /var/httpd_docs/logs/access_log combined

  ProxyPass / http://backendserver:81/
  ProxyPassReverse / http://backendserver:81/
  ProxyReceiveBufferSize 1048576
</VirtualHost>

Any ideas much appreciated...

Mike.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message