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 ?

  • More centralized (really helpfull if you have multiple servers and the same users all over)
  • When you change one user it’s global and you don’t have to repeat the changes on every single host
  • It’s faster
  • I wanted to play with it
  • Btw, there’s a great script for automating the whole process of adding users, etc to the db.

    Summertime reading

    I just went out to buy a book for the summer. Dan Brown’s “The Da Vinci Code” was for a long time inside my head and I wanted to read it…so I bought it. Reviews look spectacular, so during summer vacations it will be fun to read it, hopefully.

    What’s really interesting is that the bookshop I bought it has a website www.mybook.gr . Of course it is under construction…like 90% of greek e-commerce sites, but hopefully, sometime it will be functional and I will be able to see what’s new every week.

    I am also writing a few cds in order to make some space and prepare for the “after my vacations” format. It’s been a while I want to format my main pc. I have a spare disk exactly like my boot disk, so a software (or even hardware, my motherboard has integrated raid controller) raid looks like a great idea.I’ll try not to think about how many OS I am going to install yet, time will come.

    All set

    The machine was moved to it’s place and it is up and running. Everything worked smoothly. Let’s see how long will it stand this time.
    A second disk was installed for nightly backups, I will have to make it work though and write a few scripts for it.

    First transfers have already been started…

    Protected: Some minor fixes

    This content is password protected. To view it please enter your password below:

    Protected: Nightly update

    This content is password protected. To view it please enter your password below:

    Protected: update on phoenix

    This content is password protected. To view it please enter your password below:

    Protected: Phoenix is almost ready…

    This content is password protected. To view it please enter your password below:

    Hey! Ho! Let’s Go!

    This is my attempt to start a blog about things I do every day…