AddIcon statements are part of the Autoindex feature and configuration of Apache. What you've done is to add an Alias statement in your main configuration file that is an exact duplicate of one already contained in that feature-specific file.
Since I don't know how well-versed you are in Apache configuration, I'll lay out some basics here.
When you configure Apache, you have to tell it where the root of the web site is on disk. For Mac, this is /Library/WebServer/Documents. When you write the URL for your web site, it looks like this:
http://host.domain.tld/ and your Apache daemon considers that the root of the -site-. Anything you put AFTER that in the URL would be either a document or a path to a document WITHIN the directory where the site starts.
http://host.domain.tld/icons/ would translate to /Library/WebServer/Documents/icons on disk by default. The Alias statement is a way to 'redirect' the /icons/ subdirectory to somewhere else on disk without violating security. In this case, /usr/share/httpd/icons/
Make sense so far?
In this particular case, you're trying to get the browser to "pull" the correct image file to go with a particular file based on its extension. So, what needs to happen is that the browser needs to have the correct URL (
http://host.domain.tld/icons/p.gif) and it needs to pick that file up from the correct place on disk (/usr/share/httpd/icons/p.gif). Since you already have the Alias command to redirect the subdirectory to right place on disk, you need to tell Apache to create the correct reference when building the file indexes.
If you are not getting proper results using the /icons/p.gif reference, try removing the leading "/" and create your AddIcon directive as follows:
Code:
AddIcon icons/p.gif .ppt .pptx
Another very useful tool in troubleshooting this is to actively watch the access and error logs while you are attempting to open the directory.
You can use
Code:
tail -f /var/log/apache2/access_log
and
Code:
tail -f /var/log/apache2/error_log
CTRL-C will break those. Be sure your browser cache is cleared between attempts to ensure that the browser will attempt to retrieve the data from the server.