RackPull

Redirected /icons/ directory in Apache

Problem

You have created a directory named /icons/, but the files in it can’t be accessed and you get a listing that looks like this:

Apache icons

Solution

Search your httpd .conf files for a line starting with Alias /icons/. This line is responsible for mapping /icons/ to the default directory of file type icons.

For example, in the default Apache installation on Fedora, the file is /etc/httpd/conf.d/autoindex.conf, which is for automatically generated directory listings (mod_autoindex).

If you use the directory listing feature (meaning Options +Indexes is set anywhere) and you want the icons to work, you can either move your own directory away from /icons/, or replace all instances of /icons/ in autoindex.conf with a path you’ll never use.

If you don’t care for the icons or don’t use the directory listing feature at all, rename the file to autoindex.conf.backup or something to disable it (as long as the extension isn’t .conf).