Guide for modifying / adjusting the Apache 2.2 httpd.conf file.
The Apache httpd.conf file works “Out Of The Box” so to speak, but I advise to adjust it for your specific needs. If you are new to Apache this guide will show you the minimum adjustments needed.
Now there are some minor changes in apache 2.2 compared to apache 1.3. The httpd.conf file has been broken into smaller parts pr. default. It has always been possible to do that on apache 1.3 as well although it was not the default.
So now you need to get used to that the basic httd.conf file resides in the directory “/usr/local/etc/apache22″ and the rest of the functionality is broken down and resides in a directory called “extra” residing in the apache22 directory i.e. here “/usr/local/etc/apache22/extra”.
It is possible to put the content of all the files residing in the “extra” directory and place them directly inside the httpd.conf file. In this guide I will refer to the original layout with the extra files residing in the “extra” directory.
Now some browsers may have trouble reading some CMS systems CSS files correctly you can choose to create and modify a .htaccess file every time or just add the entry below and it will always work. you need to add the following just above the line where it reads AddType application/x-gzip .tgz
Next we will tell apache what type of pages it is serving
Apache 2.2′s configuration file comes split up in several smaller files in a directory called “extra” this would normally be in /usr/local/etc/apache22 we need to make some changes to a few files in there.
The changes below are optional although I highly recommend setting ServerSignature to Off and ServerTokens to Prod.
If you want to reverse the IP numbers as they arrive in your log files you need to change HostnameLookups Off to On.
In order for the changes made to the files in the “extra” directory to be loaded every time you start or restart apache we need to adjust the httpd.conf file accordingly.
If you run Virtual Hosts and would like to keep them in a separate file remove the # on the following line in httd.conf