Apache Server configuration support - BasicAuthentication with variable dir and htpasswd

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > March 2005 > BasicAuthentication with variable dir and htpasswd





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author BasicAuthentication with variable dir and htpasswd
Dominic

2005-03-30, 7:57 am

hello *,

I need to have a basic authentication for hundreds of directories. So
I need a flexible way in httpd.conf.

An example for my "secure" directory structure:

/documentroot/server/dep100/secure/
/documentroot/server/dep110/secure/
/documentroot/server/dep122/secure/ ...

I´d like to have a DirectoryMatch or LocationMatch with pattern like
..*/dep($1)/secure/.* and take ($1) as a variable for my htpasswd-file.

Every secure-Directory has one different username and password, of
course. The name of the htpasswd-file could be htpasswd$1, e.g.
htpasswd100, htpasswd110, htpasswd122.

I hope, you understand my needs.
I´ve Apache 2.0.49 - no mod_perl jet, but if necessary it´s possible
to activate.

Thanks for your ideas in advance.

Dominic
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com