How do you password protect the root directory?

kencl

Registered
Sep 10, 2001
2
0
301
How can I password protect the root directory with Web Protect? From the Access Menu I click the Current Folder (either the icon or the \"/\" hyperlink) and the page just keeps returning to itself?

I can password protect any sub directory, but not the root directory.

Thanks.
 

pfmartin

Well-Known Member
Aug 18, 2001
167
0
316
Earth
I think you cannot do this through the control panel. You\'ll need to do it by creating an .htaccess file by hand. Quick way: Protect a dubdirectory. Then login and copy the .htaccess file from the protected directory to the main webroot. That should do it.
 

spaceman

Well-Known Member
Mar 25, 2002
558
16
318
This is silly. You should be able to password protect the root web folder via Cpanel and not have to apply this (albeit simple) workaround. Posting this as a bug...
 

Olternit

Registered
Sep 24, 2003
4
0
151
This is the .htaccess I created in my dubditectory:

AuthType Basic

AuthName "Test"

AuthUserFile /home/test/.htpasswds/images/passwd


require valid-user

Here's my index's:

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.test.com
AuthUserFile /home/test/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/test/public_html/_vti_pvt/service.grp

How do I merge the two?
 

vicos

Well-Known Member
Apr 18, 2003
94
6
158
If you're using FrontPage, it needs to do things its own way. You should be able to protect the directory using FrontPage.

From FrontPage->Tools->Server->Permissions

It will open a new web browser and give you the FrontPage Admin tools where you can add users.
 

ramprage

Well-Known Member
Jul 21, 2002
651
0
166
Canada
Umm why are you trying to password protect the root folder with .htaccess haha! This shouldn't be readable by anyone other than the root user himself, simple as that.
 

vicos

Well-Known Member
Apr 18, 2003
94
6
158
I believe he is referring to the root directory of his web, not the root of the server.
 

Curious Too

Well-Known Member
Aug 31, 2001
437
2
318
cPanel Access Level
Root Administrator
Originally posted by vicos
I believe he is referring to the root directory of his web, not the root of the server.
The root directory of the web is not accessible via http, so it shouldn't need protecting. Only files placed in the public_html folder are accessible via a web browser.
 

Izzee

Well-Known Member
Feb 6, 2004
469
0
166
Perhaps we should try and sort out our roots so we don't get this confusion. It could then become a rooting standard.

There is nothing worse than a non standard confusing root :D

How does this look?

Server root = /
User root = /home/user/
Web root = /home/user/public_html/


Your input with any more roots could only help.