Password Protect Directories

BillyS

Well-Known Member
Mar 22, 2013
62
4
58
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
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
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.
 

BillyS

Well-Known Member
Mar 22, 2013
62
4
58
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
 

Infopro

Well-Known Member
May 20, 2003
17,075
525
613
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.