21/07/2004
WebDav + mod_mysql_auth ?
I have several users on an http server (apache of course) and they all have a seperate dir for WebDav . The authentication is being done using the default htaccess file-scheme. I want to change that and use mod_auth_mysql. Searching google was not really helpfull. But I found a very interesting module called mod_auth_user_dir for multiple webdav users (this sounds familiar!). It says it supports various authentication modules…I might try it if I can’t make mod_auth_mysql work on it’s own with webdav.
What I’ve done so far is find how normal .htaccess authentication can be replaced with sql authentication.
Here’s a sample of an older .htaccess file and the newer one:
old
AuthUserFile /foo/bar/moo/.htpasswd
AuthName "lala la lalal"
AuthType Basic
< limit GET >
require valid-user
< /limit >
>>
new
AuthType Basic
AuthName "lala la lalal"
AuthMySQLHost localhost
AuthMySQLUser htpasswd
AuthMySQLPassword THATSMYSUPERSECRETPASSWORD
AuthMySQLDB htpasswd
AuthMySQLAuthoritative On
AuthMySQLKeepAlive On
require user MYUSER
Why is it better ?
Btw, there’s a great script for automating the whole process of adding users, etc to the db.
Filed by kargig at 19:57 under General
No Comments | 3,652 views