Re: htaccess and mod_proxy (reverse proxy)

Graham Leggett <[email protected]> Thu, 30 Oct 2003 21:28:20 +0200
Newsgroups gmane.comp.apache.mod-proxy
Message-ID <[email protected]>
[email protected] wrote:

> as we find out squid cannot handle reverse proxy with authentification,
> so we taken apache, because htacces for apache works fine.
> well...  a mistake?

Using .htaccess for this definitely won't work, they only make sense for 
directories locally on the Apache server. You need to place the 
authorisation config directives inside the <Location> tags in the main 
Apache config file, not inside .htaccess files, then your authorisation 
will work fine.

If you're going to make this publically available on the net, you're 
also encouraged to make sure that Apache is set up to use SSL. This will 
ensure that passwords do not travel over the net in the clear. Details 
in the docs.

> <Location "/exchange">
> ProxyPass http://server.org/exchange
> ProxyPassReverse http://server.org/exchange
[Put the contents of .htaccess here
> </Location>

Regards,
Graham
--