I like to keep icons for a website in a top-level directory named icons. Trouble is, when the server tries to fetch anything from that dir, it either spews a "not found" error or, in the case of images, simply doesn't display the image.
Problem: The Apache web server isn't finding a website's top-level directory named /icons.
Cause: By default, Mac OS X 10.5.5's Apache server has /icons aliased to /usr/share/httpd/icons/. The server will thus always look there, instead of in your /icons directory.
Fix: Disable this alias. Launch Terminal, edit the file /etc/apache2/extra/httpd-autoindex.conf, and change this line
Alias /icons/ "/usr/share/httpd/icons/"
to this:# Alias /icons/ "/usr/share/httpd/icons/"
(The '#' is Apache's "comment" character. Apache treats the rest of the line as a comment, and ignores it.) Now restart Apache (apachectl graceful). Your browser should now find your icons just fine.
It’s worth noting that to comment out a line, you change it from:
Alias /icons/ “/usr/share/httpd/icons/”
To:
# Alias /icons/ “/usr/share/httpd/icons/”
@Richard: Duly noted. Many thanks!