Forum Moderators: phranque
Is there? If yes, are there disadvantages to doing it that way that I may not be thinking of?
thanks!
If the main server configuration file option is not available to you or perhaps not desirable, you can still scatter your .htaccess files but use a single .htpasswd and/or .htgroup file. Just keep the password and group file in one directory and refer to those files within that directory from each invocation of .htaccess authentication.
Apache tutorial on .htaccess files [httpd.apache.org]
Hi coopster,
Many thanks for getting back to me on this! :)
As a matter of fact, if you have access to the main server configuration file (httpd.conf) that is the the preferred method
And it would refer to the centrally located .htpasswd file you mentioned.
Isn't it a bit risky to be opening the http.conf file all the time to be making those additions? Does it matter if the http.conf file starts getting really large?
httpd.conffile to edit is no riskier than editing individual
.htaccessfiles. If the file starts getting large it is still no different than having the text directives spread across the filesystem -- Apache still needs to read and process the directives. It' just faster when it resides in the main configuration, that's all. It's all in the linked document mentioned earlier.
I'll have about 60 password-protected directories on my machine, and I saw in some of the documentation that it was better to do it via a DB, but that looks a little beyond my skill level, so I'll continue doing the <Directory> things in the http.conf file
Thanks again coopster!