We have a requirement for auth_mysql to be compiled into Apache to use htaccess prompts to authenticate against a MySQL Database.
The apache module required is: auth_mysql.
Some pages have suggested using a2enmod auth_mysql however I want to know if Iworx have a better way, or if anyone has already done it and if so, what did you do?
Hi Everything web, here’s what I did
1.) Downloaded mod_auth_mysql 3.0.0 from the mod_auth_mysql sourceforge site:
tar -xvzf mod_auth_mysql-3.0.0.tar.gz; cd mod_auth_mysql-3.0.0
3.) According to the BUILD file, I ran
apxs -I /usr/include/mysql/ -c -lmysqlclient -L /usr/lib/mysql -lm -lz mod_auth_mysql.c
apxs -i mod_auth_mysql.la
4.) I then edited my /etc/httpd/conf/httpd.conf and added the following line to my list of LoadModules:
LoadModule mysql_auth_module /usr/lib/httpd/modules/mod_auth_mysql.so
5.) Then I tested my config to make sure everything was happy:
At this point, you should be all set to configure mod_auth_mysql. You may need to install mysql-devel and apr-util-devel.
While we don’t technically support any 3rd-party Apache modules clients may install, there’s nothing incredibly special about the version of Apache that is installed on an InterWorx box. So, typically, using /usr/sbin/apxs to build the module (which most Apache 2.x modules support) is my preferred way of building modules.
Hope that helps,
I’ll install it on an x86_64 server and I’ll let you know if there is some tips or tricks.
It’s really usefull to have all auth in a mysql table rather than in a .htpasswd file