Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I need to password protect two directories with one user account in Apache. Will I need two Directory sections, or is there a way to combine them together?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

You can do both using the DirectoryMatch directive (regex basic skills required)

share|improve this answer
    
This is what I'm looking for, thanks! –  erimar77 Dec 15 '11 at 16:59

You could list two <Directory> sections, but refer to the same htpasswd file; is that what you meant…? I presume that these aren't a directory, and one that it also contains…

share|improve this answer
    
I was hoping to avoid two directory sections, it appears @thinice has pointed me in the right direction. –  erimar77 Dec 15 '11 at 16:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.