Password-Protect Web Root - Not Possible?

JinGu

Member
Mar 26, 2006
17
0
151
Hi,

I am using cPanel to password-protect a web root directory (public_html), since the site is currently in development and I don't want any visitors or the search engines to index it yet.

After password-protecting the directory, the protection is working fine - but then when I check again the next day, the password-protection is gone.

I have gone through the password-protection process 3 times, and each time it later removes itself. This is on a new hardened server and nobody else has access, and there isn't any other unusual activity.

The passwd file is still in the correct .htpasswds directory, but the .htaccess is missing the Auth lines.

I'm wondering if cPanel (or WHM) has some sort of 'dummy-protection' to stop people from accidentally password-blocking their own homepage...

Has anybody else experienced this?

Server is running WHM 11.15.0, cPanel 11.18.3-C21703, CENTOS Enterprise 5

Thanks,
Jin
 

johndoe

Active Member
May 26, 2002
38
1
308
Password Protected Web Root

Hi JinGu,

I'm not sure if this will help. I've password protected root directories on ocassion when developing a site for a design client. One such example is:

http://www.harlemanproducts.com

I do it by going into the cPanel of the subject domain, then clicking on "Password Protect Directories". First, I click on the "public_html" text link (not the folder) and enter the desired message for the alert box. After this step, I create an authorized user(s) with corresponding password(s).

I've also discovered the process works when clicking on the "/" at the root folder level and following the procedure outlined above.

It sounds like you're doing the same thing, but I wanted to offer the steps I take just in case you may be overlooking something.

Best wishes,

johndoe
 

JinGu

Member
Mar 26, 2006
17
0
151
Thanks for your reply. I believe I was following the same steps, but since the last time that I attempted the password protection it seems to have finally stayed intact. I'm not sure what the problem was previously, but I'm happy that it's now working. Thanks again for offering your thoughts.

Regards,
Jin