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.
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.
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:
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.