Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2005

    Query in Apache module mod_auth_mysql


    My requirement was to authenticate a web folder with user information stored in mysql database. So i have installed the mod_auth_mysql module on our web hosting server.
    There are serveral hosting accounts on that hosting server. After installation of mod_auth_mysql , the default authentication method got replaced with Mysql Method. so all of our users were not getting their web access to restrictated area. I got solution from one of the thread on this forum. It was telling about Adding
    following line to .htaccess file of the folder where you want to setup default authentication method.
    AuthMySQLEnable off

    This was realy a problem for us. Bcos i have to change all the .htaccess file for this one line.

    Is there any solution by which i can install mod_auth_mysql in such a way that it should get apply to the folder which contains .htaccess file with "AuthMySQLEnable On".??
    Default method of authentication shouldn't get replaced with the mysql method.

    Please help me out.
    Thanks in advance.

  2. #2
    Join Date
    Feb 2002
    Vestal, NY
    If you can specify that directive in .htaccess, you should also be able to do it in your httpd.conf, which might be a bit easier. If all of the virtual host's document roots' are located under one common direcotry (such as /www for example - virtualhost1 is /www/virtualhost1 and virtualhost2 is /www/virtualhost2, etc), you may be able to do exactly what you are hoping for:

    <Directory /www>
    AuthMySQLEnable off
    Options All
    AllowOverride All

    Then, I BELIEVE you could use the AuthMySQLEnable ON option as needed on a case by case basis.

    Otherwise, you may have to put a directory directive within each virtual host directive under httpd.conf, which is at least easier than writing it to hundreds of .htaccess files. A simple perl script could automate the task.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts