Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a directory on my Cherokee webserver that I am trying to password protect so that when I try to enter it from a web browser, I get a pop up demanding username and password. Needless to say I am getting stuck.

I have created the .htaccess file with:

AuthUserFile /srv/http/protected
AuthGroupFile /dev/null
AuthName "Protected Stuff"
AuthType Basic

Require valid-user

And I used the apache-tools' htpasswd command:

htpasswd -c .htpasswd wdkrnls

I configured Cherokee with a behavior rule on the /protected directory which requires htpasswd authentication and restarted. I get Error 405 Method Not Allowed whenever I navigate there in a directory.

What more do I need to do? Thanks for your help.

share|improve this question

migrated from Feb 7 '11 at 6:03

This question came from our site for computer enthusiasts and power users.

Cherokee don't support Apache mod_authn_file directives. You need use cherokee-admin to configure htpasswd authentication: enter image description here

share|improve this answer
I had this already. What appeared to be one part of my problem was that I had every rule listed as [Final]. When I made them not final, I got the prompt I had been expecting. However, I still cannot see the files in the directory. – wdkrnls Feb 7 '11 at 7:37
"IP_ADDRESS/protected/" 404 Not Found? Do you correct set "Document Root" and "Document Root" exist? Do you set "Handler" to "Static content"? – alvosu Feb 7 '11 at 7:43
Maybe it’s also an issue of denying directory listing? "see the files". Try opening a file directly. – Kissaki Mar 1 '11 at 9:52

Your Answer


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.