Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Configure Apache to work with mod_auth_msyql

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I'm trying to get mod_auth_mysql running under apache and I am getting nowhere. I am running two copies of apache and mysql off of my server and configured mod_auth_mysql with the paths to the correct versions of mysql and apache.

I have created a mysql database "tcd" and am using the default table name of "mysql_auth" with fields "username" and "passwd", also the defaults.

From there I updated my httpd.conf file and added the lines:
Auth_MySQL_Info localhost test testpass
Auth_MySQL_General_DB tcd

test and testpass are the username/passsword for mod_auth_mysql to use.

The final step was for me to create a .htaccess file in the directory I want to protect. Here is what is in my .htaccess file:

AuthName "Authorization Required"
AuthType Basic
Auth_MySQL_DB tcd
Auth_MySQL_Password_Table mysql_auth
Auth_MYSQL on
Auth_MySQL_Empty_Passwords Off
Auth_MySQL_Encryption_Types Plaintext
Auth_MySQL_Encrypted_Passwords off
order deny, allow
require


I have also tried a .htaccess file that is the same except it does not contain the line "order deny, allow" and it has require valid-users.
In the database I have two username/passwd pairs so that is not the problem. I also have a link from one page to another page in a different directory, the one that should be password protected. If you have any ideas please help me.

Wolf Klinker
 
Hi,

Does it make a difference if you set :

Auth_MySQL_Authoritative on

The other thing would be are the passwords in the table encrypted ? By default, there should be three columns in the table - username, passwd, and groups - with passwd containing a DES encryption of the plain text as per the result of :

mysql> Select ENCRYPT("plaintextpasswd")

Also, presumably you have the LoadModule (etc,) entries in httpd.conf ?

Hope this helps



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top