How to tune apache

I am not an apache guru but I can share some of the things I did on my server. The first step is to disable useless modules and the second one is to tune your configuration file.

First, you need to know which module is enable : apachectl -t -D DUMP_MODULES or apache2ctl -M

Then rm all unused modules (excepted core) in the /etc/apache2/mods-enabled (on my debian wheezy). Don’t worry to deleted modules, there are on links pointing at ../mods-avalaible. So at any moment you can set them back.

In my case, I deleted negociation.* / proxy.load / cgi.load

Concerning the httpd.conf / apache2.conf (different name but same file), very high quality content exists on the internet. Everything is clearly explained so I won’t copy / paste or write another tutorial. I especialy do like one made for low memory servers. If you know how to manage 1Gb, 24Gb won’t be an issue…

http://imperialwicket.com/tuning-apache-for-a-low-memory-server-like-aws-micro-ec2-instances 

 

When everyting is set up or to test a new config, use ab (apachebench) to benchmark your new config. I use “ab -c 10 -n 100 http://yourwebsite.com/” (10 requests at a time until 100).

Leave a Reply

Your email address will not be published. Required fields are marked *