engarde-users March 2003 archive
Main Archive Page > Month Archives  > engarde-users archives
engarde-users: [EnGarde] Re: mod_auth_mysql Configuration

[EnGarde] Re: mod_auth_mysql Configuration

From: Richard-James Acreman <rj_at_nospam>
Date: Tue Mar 11 2003 - 10:40:32 GMT
To: <engarde-users@engardelinux.org>

The RPM has most likely installed the Invernia version of mod_auth_mysql http://www.invernia.com/view/mod_auth_mysql

This version uses different parameters to the original. You should check your documentation for the module (which might be at /usr/share/doc/mod_auth_mysql.txt)

This version of mod_auth_mysql does not require the Auth_MySQL_Info parameter to be declared in the server's httpd.conf file and also the parameter names that are declared in the .htaccess file are slightly different from the original. For example instead of Auth_MySQL_Host it uses AuthMySQLHost. An example of a .htaccess file using the Invernia mod_auth_mysql would be ... AuthName "Members Area" AuthType Basic AuthMySQLHost localhost AuthMySQLUser mysqlusername AuthMySQLPassword mysqlpassword AuthMySQLDB database AuthMySQLUserTable users AuthMySQLCryptedPasswords On AuthMySQLAuthoritative Off AuthMySQLNoPasswd Off AuthMySQLNameField username AuthMySQLPasswordField password require valid-user

Kind regards,

Richard-James Acreman
The Web Design Company

-----Original Message-----

From: Ken Romero (kromero) [mailto:kromero@cisco.com] Sent: 24 January 2003 16:29
To: 'engarde-users@engardelinux.org'
Subject: RE: [EnGarde] mod_auth_mysql Configuration


I am having trouble configuring the mod_auth_mysql module for apache.

  • I have downloaded and installed an RPM from the www.rmpfind.net archives for Engarde (mod_auth_mysql-1.11-1.0.100.i686.rpm).
  • I have cofigured the appropriate lines into my /etc/httpd/conf/httpd.conf file....

    LoadModule mysql_auth_module modules/mod_auth_mysql.so AddModule mod_auth_mysql.c Auth_MySQL_Info localhost root <passwd-snipped>
  • I have confirmed that the root username and password does provide me successful access into the mysql monitor (see output)....

    [root@www html]# mysql -hlocalhost -uroot -p Enter password:<passwd-snipped> Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 to server version: 3.23.36 mysql>
  • When I attempt to restart the web server, I get the following error....

    Syntax error on line 137 of /etc/httpd/conf/httpd.conf: Invalid command 'Auth_MySQL_Info', perhaps mis-spelled or defined by a module not included in the server configuration
  • Whe I comment out the 'Auth_MySQL_Info' line in the /etc/httpd/conf/httpd.conf file, I see that the web server *will* start successfully. However the .htaccess file will cause an error to be logged...

    [root@www html]# tail ../logs/error_log [Fri Jan 24 01:14:01 2003] [alert] [client] /home/httpd/www.deepinthemoney.tzo.com-80/html/members/.htaccess: Invalid command 'Auth_MySQL_DB', perhaps mis-spelled or defined by a module not included in the server configuration
  • My .htaccess file looks like such....

    AuthName "DeepInTheMoney.Com Members Only!" AuthType Basic
Auth_MySQL_DB www_deepinthemoney_com Auth_MySQL_Password_Table mysql_auth Auth_MySQL_Username_Field username Auth_MySQL_Password_Field password Auth_MySQL_Empty_Passwords off Auth_MySQL_Group_Table mysql_auth Auth_MySQL_Group_Field status

RewriteEngine on
RewriteBase /members
RewriteRule ^index\.html$ 030123/index.html [R] RewriteRule ^$ 030123/index.html [R]

<Limit GET>
require group CURRENT

Any help will be greatly appreciated!!!!


Ken Romero

To unsubscribe email engarde-users-request@engardelinux.org with "unsubscribe" in the subject of the message.