You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Steffen Wieschalla <st...@LF.net> on 2008/02/29 16:41:18 UTC

[users@httpd] mod_proxy and basic authentication

Hi,

my used httpd is Apache 1.3.37 under Solaris 10 (Sparc).

I want to configure it to be a proxy for another system but the access
must be limited with a method like basic authentication.

My current configuration looks like this:

[snip]

<VirtualHost 1.2.3.4:80>
   ServerAdmin admin@foo.net
   DocumentRoot /usr/local/apache/
   ServerName www.foo.net
   DirectoryIndex index.htm index.html
   SetEnv PERLROOT /usr/local/Perl5
   SetEnv PERLLIB /usr/local/Perl5/lib:

  ProxyPass / http://5.6.7.8/
  ProxyPassReverse / http://5.6.7.8/

  <Directory />
        AuthType Basic
        AuthName Demo-Access
        AuthUserFile /usr/local/apache/apache-authorization
        Require valid-user
  </Directory>
</VirtualHost>

[snap]

Without the "ProxyPass*" lines I'll get the basic auth request. With the
"ProxyPass*" lines it delivers the content of http://5.6.7.8/ without
prompting for a login/password.

It seems that the apache completely ignores the authentication if the
requested url matches the proxy directives.

Can someone give me a hint to solve this problem, please?

Thanks in advance :)

Steffen
-- 
Steffen Wieschalla, stw@LF.net
Tel:  +49 711 90074-418
Fax:  +49 711 90074-33
http://www.LF.net/

LF.net Netzwerksysteme GmbH
Ruppmannstr. 27
70565 Stuttgart (Germany)
Handelsregister Stuttgart: HRB 18189
Geschaeftsfuehrer: Norman Fuerst, Rodney Volz


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_proxy and basic authentication

Posted by Joshua Slive <jo...@slive.ca>.
On Fri, Feb 29, 2008 at 10:41 AM, Steffen Wieschalla <st...@lf.net> wrote:
> Hi,
>
>  my used httpd is Apache 1.3.37 under Solaris 10 (Sparc).
>
>  I want to configure it to be a proxy for another system but the access
>  must be limited with a method like basic authentication.
>
>  My current configuration looks like this:
>
>  [snip]
>
>  <VirtualHost 1.2.3.4:80>
>    ServerAdmin admin@foo.net
>    DocumentRoot /usr/local/apache/
>    ServerName www.foo.net
>    DirectoryIndex index.htm index.html
>    SetEnv PERLROOT /usr/local/Perl5
>    SetEnv PERLLIB /usr/local/Perl5/lib:
>
>   ProxyPass / http://5.6.7.8/
>   ProxyPassReverse / http://5.6.7.8/
>
>   <Directory />
>         AuthType Basic
>         AuthName Demo-Access
>         AuthUserFile /usr/local/apache/apache-authorization
>         Require valid-user
>   </Directory>
>  </VirtualHost>
>
>  [snap]
>
>  Without the "ProxyPass*" lines I'll get the basic auth request. With the
>  "ProxyPass*" lines it delivers the content of http://5.6.7.8/ without
>  prompting for a login/password.
>
>  It seems that the apache completely ignores the authentication if the
>  requested url matches the proxy directives.
>
>  Can someone give me a hint to solve this problem, please?

Since your request never accesses any directory on the proxy server,
<Directory> blocks are not applied. Try <Location /> instead.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org