The purpose of optimizing Apache is to make a website load faster. Here are some of the things you can do to make your website load faster.
1. Use compression by using mod_gzip
2. Encourage the client to cache by using mod_expire and mod_header.
3. Do not load unnecessary modules.
This will make your Apache run faster. As for the question ‘which modules are not necessary?’ It varies from case to case. For example, WordPress typically needs these modules…
You might want to consider omitting the other modules that you do not need if you are running WordPress.
4. Experiment with the “KeepAlive”.
If you site is full out scripts, you want to set “KeepAlive” as “off”. This is because there is no point making Apache to keep a connection alive (and thus wasting resources) if the client’s request has been executed. It’s better to close the connection and, use the resource to serve connections that are actually doing something.
5. Last but not least, increase your resources.
Getting more RAM and bandwidth will definitely make your web page load faster.
If you are coding in PHP, you can use function “memory_get_usage” to see how much memory your script takes.
You can use “Firebug” (http://getfirebug.com/), an extension of the Firefox browser, to see which parts of your web site are taking to the longest to load. Sometimes, it could be just an image that you forgot to scale down to size. No point loading a 500K image for a thumbnail, for example.
(The last 2 points does not optimize Apache per-se, but they are things that you check on to help make your web site load faster.)