The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

password protecting a sub category not working

Discussion in 'General Discussion' started by basslion, Sep 15, 2016.

  1. basslion

    basslion Registered

    Joined:
    Jul 8, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Markham
    cPanel Access Level:
    Website Owner
    In CPanel i have setup password protection via "Directory Privacy". I have a website which is live and within the root folder i have a subcategory which i am trying to password protect.

    I open Directory Privacy and go to Public_html and then click back and then go to the subcategory and then i set the name and check password protect this directory and i add a username and password.

    The padlock shows in the tree showing the subcategory is protected, however when i go to the url/subcat it just returns a 404 error page from the root website. If i take password protection off, i can then access the subcategory fine.
     
  2. kdean

    kdean Well-Known Member

    Joined:
    Oct 19, 2012
    Messages:
    262
    Likes Received:
    12
    Trophy Points:
    18
    Location:
    Orlando, FL
    cPanel Access Level:
    Root Administrator
    The root level of your account is not publicly accessible via your browser. If you only have the one site, then everything should be within the public_html folder, so create your subfolder inside the public_html folder and then set the directory privacy.

    You can have a folder outside the public_html folder accessible if you created a sub-domain or add-on domain and pointed to a folder not located within public_html.
     
    cPanelMichael likes this.
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, as mentioned, the subdirectory should reside within the public_html directory unless it's document root is configured otherwise.

    Thank you.
     
Loading...

Share This Page