Hello,I'm working with Apache 2.2.3, MySQL 4.1.12 on CentOS. I have compiled mod_dbd, authn_dbd (along with the apr_dbd_mysql.c from http://apache.webthing.com/database) and I've successfully configured authn_dbd on the base config. (httpd.conf)
This is the sample httpd.conf blurb that works DBDriver mysqlDBDParams "host=127.0.0.1 port=3306 user=daemon pass=daemon dbname=htusers"
DBDMin 1 DBDKeep 2 DBDMax 10 DBDExptime 60 <Directory /> AuthType Basic AuthName "My Server" AuthBasicProvider dbd AuthDBDUserPWQuery "select password from users where username = %s" Require user test_user Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory>However there's two different ways I've tried pushing it into a virtual host.
Option a) <VirtualHost __my_ip__:80> DBDriver mysqlDBDParams "host=127.0.0.1 port=3306 user=daemon pass=daemon dbname=htusers"
DBDMin 1 DBDKeep 2 DBDMax 10 DBDExptime 60 ServerName __my_server_name__ DocumentRoot /tmp/test_dbd_auth <Directory /tmp/test_dbd_auth> AuthType Basic AuthName "My Server" AuthBasicProvider dbd AuthDBDUserPWQuery "select password from users where username = %s" Require user test_user Options +Indexes Require valid-user Allow from all </Directory> </VirtualHost> Results in the only error message being:[Fri Feb 23 11:11:53 2007] [error] [client __client_ip__] Error looking up test_user in database
Option b) DBDriver mysqlDBDParams "host=127.0.0.1 port=3306 user=daemon pass=daemon dbname=htusers"
DBDMin 1 DBDKeep 2 DBDMax 10 DBDExptime 60 <VirtualHost __my_ip__:80> ServerName __my_server_name__ DocumentRoot /tmp/test_dbd_auth <Directory /tmp/test_dbd_auth> AuthType Basic AuthName "My Server" AuthBasicProvider dbd AuthDBDUserPWQuery "select password from users where username = %s" Require user test_user Options +Indexes Require valid-user Allow from all </Directory> </VirtualHost> Results in an error message being:[Fri Feb 23 11:13:10 2007] [error] [client __client_ip__] No DBD Authn configured!
Is something really basic I'm doing wrong to get this working with virtual hosts?
Thanks in advance to any help I may get. -Zach --------------------------------------------------------------------- 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@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx