Configuring Apache 2.0 -- Beginning - Index Options
(Page 5 of 5 )
The index files that Apache can generate for directories missing index files often require a lot of configuration. This section will describe how the basics of this configuration work. The first configuration setting is the “IndexOptions” directive. This tells the server if you want regular or fancy directory indexing. This mainly means that if column headings are selected, the index file will be regenerated ordered by the data in that column.
Since Apache can be configured to create index files that link to each file in a directory, it is often useful to associate certain file types with icons that can be displayed in these index files next to certain file types. This can actually be done in several ways, both by file extension and MIME type. Here, we will deal with simply doing this by file type.
The AddIcon directive takes two main arguments, first the icon to be displayed, and secondly, a list of file extensions for which it is to be displayed. This directive looks like “AddIcon /icons/binary.gif .bin .exe” This would associate the /icons/binary.gif image with files named *.bin and *.exe. The “DefaultIcon” directive specifies the icon to be displayed when no other is defined. “AddDescription” will associate a text description with a certain file extension. “AddLanguage” tells Apache what language to use for files with a certain file extension.
Conclusion
This article has shown how to configure some of the basic options in Apache. You know how to set up the directory structure and the major server-wide options. Remember, setting up these options correctly will have a great effect on the security of your server. You will also want to read as much of the documentation on each of these configuration options as possible.
I have described how to configure an operational HTTP server that will allow you to serve up basic static pages to the world. However, there is much more to configuring a really useful HTTP server. The following articles in this series will cover Authentication, Virtual Hosts, PHP, Perl, SSL, and many other topics.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |