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 Protect Directories

Discussion in 'General Discussion' started by BillyS, Nov 11, 2014.

  1. BillyS

    BillyS Active Member

    Joined:
    Mar 22, 2013
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I'm using CPanel's Password Protect Directories to prevent access to the administrator directory of a Joomla-based website. This works as expected and I've been using this for years without any problem.

    When I look in my error log, I see apache throws a 401 error for .ico files. This is worrisome because Joomla 3.X uses glyph icons and I'm concerned they'll also throw a 401 error and I will not be able to see the symbols.

    The .htaccess file is in the form:
    Code:
    AuthName "Restricted Area"
    AuthType Basic
    AuthUserFile /home/sitename/.htpasswds/Admin/.htpasswd
    AuthGroupFile /dev/null 
    require valid-user
    Is there something in the configuration for this authentication that needs tweaking?

    Bill
     
    #1 BillyS, Nov 11, 2014
    Last edited: Nov 11, 2014
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    What's the exact message you see in the Apache error log? Are the icons stored in the same directory that's password protected?

    Thank you.
     
  3. BillyS

    BillyS Active Member

    Joined:
    Mar 22, 2013
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I tried running
    Code:
    tail -f /usr/local/apache/logs/error_log
    but did not see the error in the logs. However, when I look in CPanel, I do see the error as a 401.
    Code:
    /administrator/templates/whatever/favicon.ico 
     Http Code: 401 Date: Nov 12 19:18:47 Http Version: HTTP/1.1 Size in Bytes: 796 
     Referer: - 
    
    The /administrator/ folder is password protected, so the icon is in a subfolder.


    I tried looking at live headers and noticed the favicon.ico was returning a 206 (partial). So I tried to access the icon directly by entering the full path on the browser and it rendered the icon.

    I don't know if this even matters at this point. Thanks for your prompt response.

    Bill
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Favicon normally goes in root of the account. /http://www.joomla.org/favicon.ico for example. There should be no reason to add one to the administrator folder, really. Check to see where your favicon actually is. When you find it, remove this one in administrator directory and see what breaks, or not.
     
Loading...

Share This Page