Using Apache, is there a way to protect all items beneath directory names that contain a certain string?

For example, if I have this structure:

wwwroot-->
  project1-->
    docs-->
        xls
        doc
          private_docs-->
            txt
        txt
    private-->
        pdf
        doc
  project2-->
    docs-->
        log
        txt

Is it possible to user password protect all directories that contain the word "private" ?

link|improve this question

feedback

1 Answer

It sure seems like you need to place your authorization configuration in either a LocationMatch or DirectoryMatch container.

The match expression might look something like ^/.*/private.*.

link|improve this answer
See this similar question. serverfault.com/questions/118917/… – Zoredache Dec 1 '11 at 21:28
feedback

Your Answer

 
or
required, but never shown

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