These are all changes that need to be made to your httpd.conf file in order to make Apache behave the way you want it to behave. On a Mac, the httpd.conf file lives at /etc/apache2/httpd.conf. Once you've made the changes, you need to restart Apache using a command like "sudo apachectl restart".
-
In order to Include HTML Files within HTML Files, first enable SSI directives in
the httpd.conf file by adding +Includes to the directory Options directive.
Options +Include
If you would like to have all .html files parsed for SSI, you need to add this to the filtering directiveAddOutputFilter INCLUDES .shtml .html
then add the lineXBitHack on
In your httpd.conf file. Then restart Apache. In your .html file, place the line<!--#include FILE="navbar.html" -->
or whatever filename you would like in place of "navbar.html"
-
If you want to enable PHP directives on your webserver, you have to
include the following line in your httpd.conf file.
LoadModule php5_module libexec/apache2/libphp5.so
-
If you want to add file names besides index.html that will be displayed when a
directory is requested on your server, you need to change the dir_module
section. For instance, if you want index.php to be read, we need to modify
dir_module as follows
< IfModule dir_module >
   DirectoryIndex index.html index.php
< /IfModule >
-
In order to change the default behavior of the directory listing/auto indexing
done by apache, changes need to be made to the Apache Module mod_autoindex
in your http.conf file. In particular,
we can change the header of a file so that it includes a separate html file.
This is accomplished by adding (in the mod_autoindex.c directives of the httpd.conf file):HeaderName /DirectoryIndex.html
where / is with respect to the root directory of the apache installation (for default MAC OS X set-up this is /Library/Webserver/Documents/) and DirectoryIndex.html is the name of the .html file from which the source is taken. Then restart the apache server.
-
The default behavior of the directory listing is to use FancyIndexing. This
is nice since it allows a user to sort through the directory by the file's
name, size, or last modification date. However, the default is to include
a column called "Description" with a large width of 49 bytes (characters).
The large width of this column results in the file name being chopped short.
To disable this behavior, we can add the following line (in the mod_autoindex.c directives of the httpd.conf file):IndexOptions FancyIndexing NameWidth=* SuppressDescription
Then restart the apache server. On Windows, you must first uncomment the lineInclude conf/extra/httpd-autoindex.conf
in httpd.conf and then add the IndexOptions statement above to conf/extra/httpd-autoindex.conf