apache 2.2 instructions

Help
2008-04-26
2013-04-23
  • alan birtles
    alan birtles
    2008-04-26

    After much fiddling i have managed to get the module to work with apache 2.2. To help others here are the steps i took:
    1. patch mod_auth_mysql.c, i used the patch from http://www.bleb.org/software/mod_auth_mysql-3.0.0-apache-2.2.3.patch
    2. compile and install as usual
    3. if you try using it now you will probably get internal server errors. I found the config has to be quite specific or it wont work:

      AuthUserFile /dev/null
      AuthBasicAuthoritative Off
      AuthName XXXXX
      AuthType Basic
      Require valid-user
      AuthMySQLEnable On
      AuthMySQLHost localhost
      AuthMySQLUser XXXXX
      AuthMySQLPassword XXXXX
      AuthMySQLDB XXXXX
      AuthMySQLUserTable XXXXX
      AuthMySQLNameField XXXXX
      AuthMySQLPasswordField XXXXX
      AuthMySQLPwEncryption none
      AuthMySQLAuthoritative on
      AuthMySQLUserCondition XXXXX
    replace "XXXXX" with your own values. I havent tried encryption yet

     
  • Rupert Hunt
    Rupert Hunt
    2010-06-21

    Hello

    I used the patch and it seemed to compile fine, however after adding the loadmodule line to httpd.conf, when trying to start apache I get:

    httpd: Syntax error on line 117 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/mod_auth_mysql.so into server: dlopen(/usr/libexec/apache2/mod_auth_mysql.so, 10): no suitable image found.  Did find:\n\t/usr/libexec/apache2/mod_auth_mysql.so: mach-o, but wrong architecture

    Any ideas?

    Many thanks
    Rupert