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

I'm running Apache/2.2.3 on a centos 5 server and trying to setup authentication for a subdirectory in a user's public_html folder. I created a .htaccess file and .htpasswd file in that subdirectory with permissions 0644. But now the subdirectory does not show up on the user's web page. It is accessible by giving the full url path to the subdirectory but I would like to have the folder display when I go to www.domain.com/~user. Here's what I have in my httpd conf file.

<Directory /home/*/public_html>
  AllowOverride AuthConfig

The only thing that works a bit for me is to set AllowOverride to None in the /home/*/public_html directory config but that just enables the folder to show and does no authentication. Can anyone help me?

share|improve this question
What errors do you see. Are there any related messages in your error log ? –  Iain Mar 1 '12 at 20:04
I don't see any errors and nothing shows up in the error logs either.I should modify my question because it seems I can access the protected subdirectories using the full url path to them i.e www.mydomain.com/~user/private_subdirectory. Its just that when I go to www.mydomain.com/~user those directories don't show up. –  JavaDev Mar 1 '12 at 21:46
add comment

Your Answer


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

Browse other questions tagged or ask your own question.