To get mysql authentication working in Gutsy, you have to manually
compile mod_auth_mysql:

1. wget 
http://heanet.dl.sourceforge.net/sourceforge/modauthmysql/mod_auth_mysql-3.0.0.tar.gz
2. wget http://www.bleb.org/software/mod_auth_mysql-3.0.0-apache-2.2.3.patch
3. tar zxf mod_auth_mysql-3.0.0.tar.gz
4. apt-get install apache2-prefork-dev libmysqlclient15-dev; apt-get --purge 
remove libapache2-mod-auth-mysql
5. cd mod_auth_mysql-3.0.0
6. patch < ../mod_auth_mysql-3.0.0-apache-2.2.3.patch
7. sed -i 's|#include <mysql.h>|#include <mysql/mysql.h>|' mod_auth_mysql.c
8. apxs2 -c -lmysqlclient -lm -lz mod_auth_mysql.c
9. apxs2 -i mod_auth_mysql.la
10. echo 'LoadModule mysql_auth_module 
/usr/lib/apache2/modules/mod_auth_mysql.so' > 
/etc/apache2/mods-available/auth_mysql.load
11. a2enmod auth_mysql

Configure it as follows (adapt to your environment):

        <Location /mysqlauth>
            AuthName "test"
            AuthType Basic
            AuthUserFile                /dev/null
            AuthBasicAuthoritative      Off

            AuthMySQLEnable             On
            AuthMySQLAuthoritative      On
            AuthMySQLDB                 apache_auth_test
            AuthMySQLUser               authtestuser
            AuthMySQLPassword           something
            AuthMySQLUserTable          auth
            AuthMySQLNameField          username
            AuthMySQLPasswordField      passwd
            require                     valid-user
        </Location>

Hope this helps someone.

-- 
gutsy does not have a working apache+mysql authentication solution
https://bugs.launchpad.net/bugs/150649
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to