Re: Password Protecting a Root Directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Jim Perrin wrote:
On Feb 18, 2008 3:30 PM, John Hinton <webmaster@xxxxxxxx> wrote:
I have apache running with virtual hosting.

I have a customer who wants to password protect their /user/public_html
directory using htaccess. I've done this many times on directories
inside of that directory with positive results. However, I don't seem to
be able to password protect the document root directory.

Any ideas?

Do you have AllowOverrides on for the webroot?


Actually, I was trying to do something that was sort of working, but apparently Apache was seeing it differently.

This was for a subdomain. Instead of creating the usual /var/www/user/public_html, I had pointed Apache at a directory inside of the domain's document root. There turned out to be no advantages to this except I guess one could argue a single place to FTP in.

I tried my same setup with another subdomain with it's own standard document space, and it all worked like I expected.

So, I'm betting that Apache was somehow assigning that first subdomain's directory and the htaccess stuff to the main domain and in fact it did work that way. But, when using the subdomain it didn't see the directives at all. I bet if I moved the subdomain in front of the domain in the vhosts list, that this would work, but, that's a pretty darned fragile way of doing things.

So, I'm punting... I'm going to change it all over to using it's own unique document root and not go any further with this mess.

Thanks,
John Hinton
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux