You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Eric Frazier <ef...@kwinternet.com> on 2002/04/17 21:47:16 UTC
mod_proxy auth with username and password
Hi,
I am trying to use Apache::AuthDBI to do password authentication of proxy
users. I have AuthDBI working fine with a regular directory like htdocs. But
when I can't get it to work with the proxy.
I tried in Netscape 4.72 to use a url like this
http://username:password@192.168.0.5
I also tried that url directly in the location bar
http://username:password@cnn.com
That seemed to do something right because I got
poohpc - - [17/Apr/2002:13:36:47 -0700] "GET
http://efrazier:XXXXXXXX@cnn.com/ HTTP/1.0" 403 229 in the error log for
that one.
PerlRequire /usr/local/proxy/apache/conf/Start.pl
#proxyconf
<IfModule mod_proxy.c>
ProxyRequests On
<Directory proxy:*>
Order deny,allow
Deny from all
#Allow from 192.168.0.2
#Allow from 192.168.0.3
#Allow from 192.168.0.5
Allow from localhost
AuthName DBIproxy
AuthType Basic
PerlAuthenHandler Apache::AuthDBI::authen
PerlSetVar Auth_DBI_data_source dbi:mysql:theDB
PerlSetVar Auth_DBI_username myusername
PerlSetVar Auth_DBI_password mypassword
PerlSetVar Auth_DBI_pwd_table user_info
PerlSetVar Auth_DBI_uid_field username
PerlSetVar Auth_DBI_pwd_field password
PerlSetVar Auth_DBI_log_field log
PerlSetVar Auth_DBI_encrypted off
require user efrazier
</Directory>
===============================
Start.pl contains
#!/usr/bin/perl -w
use Apache::DBI ();
use Apache::AuthDBI ();
Apache::AuthDBI::DEBUG=3;
#use CGI;
#CGI->compile(qw(header param));
Apache::DBI->connect_on_init('dbi:mysql:dbname=theDB', 'myusername',
'mypassword');
=============================
I don't find anything on a google search about auth with usernames and
passwords. Mostly it seems to be about restricting by domains which won't
help me.
It might just be that I need to change my syntax a bit, or I am thinking
maybe there is a ProxyAuthHandler or something that I will have to use with
mod_perl.. Just to mention again, AuthDBI works fine with any directory auth.
Thanks,
Eric
http://www.kwinternet.com/eric
(250) 655 - 9513 (PST Time Zone)
Learn about the net, not the .Net!
---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org