FW: [SLUG] Apache is driving me nuts

From: Ben Ostrowsky (ostrowb@tblc.org)
Date: Thu Dec 08 2005 - 08:31:11 EST


From: Wayne Pollock [mailto:pollock@acm.org]
Sent: Wednesday, December 07, 2005 8:56 PM
To: ostrowb@tblc.org
Subject: Re: [SLUG] Apache is driving me nuts

I seen this before. I can't remember what the problem was, but it had
nothing to do with permissions. I think the file had been copied from a
Windows system, or unziped from a zip done on a windows system, and that
screwed it up.

Or maybe it's that a favicon is not per-URL, it is per-DNS name. That is,
the system only will look for "/favicon.ico", and not
"/barcode/favicon.ico". (I can't remember.)

Trouble-shooting steps to take:

Check for invisible characters in the filename: ls | od -bc (This is a
likely cause. Make sure the name is all lower-case.)

Check the type of the file: file favicon.ico (This is also a likely cause,
but the file command may not reveal the problem. There are different
formats for .ico files, and apache only understand one (maybe some) of them.
You can try using one of the Linux icon editors to try to open, and then
save, to see if that fixes the format.)

Of course it could be a permissions issue:

Check all directories up to and including / for a .htaccess file.

Check all directory and parent directories to be sure they all allow execute
by others.

The file, of course, should only be readable (by all). Note if other
permission bits are set (such as the setGID bit) the file may not be
readable.

Use mount command to see if you have any funky mount options.

Use lsattr to see if any extra attributes have been set on the file or any
ancestor directories.

Use getfacl on the file and ancestor directories to see if any ACLs have
been set.

Apache has known issues with SELinux. Try rebooting with SELinux off.
(Add to the book command line: selinux=0 )

Other things to try:

Replace the bad favicon with a copy of one that does work (and verify the
permissions after the copy). Be sure to restart apache and your browser, to
clear any caches. (Often you get it working and don't realize it!)

Move or copy the bad facicon.ico file to another location and see if it
works from there.

Check the HTTPD configuration. That includes httpd.conf as well as the
files in conf.d (On Fedora that is /etc/httpd/conf.d.) Look for
restrictions, URL re-writing, MIME type settings for ".ico". Note
restrictions can be on files, virtual hosts, locations, or directories.
Any Alias directives can affect which security restrictions apply. Owner,
group, and permission information is especially sensitive for directories
containing scripts (CGI). Too much access will trigger a security block!

Use the "logLevel" directive to add more error log information. The default
value is "warn", but you can use "notice", "info", or "debug".

In a pinch, move your conf to someplace else and re-install a vanilla one,
and see if the problem goes away.

If all that fails to work, post a message on the appropriate Apache mailing
list.

Hope this helps!

-Wayne Pollock

P.S. As a SLUG digest subscriber I can't post to the list. Hence this
      email response. Please repost to the SLUG list if you think anyone
      might benefit from this post. Thanks.

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:22:33 EDT