SWA Awards ribbon
Signetique - a true Managed Server Specialist since 1996.
Our Engineers Tested the BEST WAY to Optimize Apache and Make a Website Load Faster
Share:Share on Facebook0Share on Google+0Tweet about this on Twitter0

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

Use compression by using mod_gzip

2.  Encourage the client to cache by using mod_expire and mod_header.

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…

mod_dir
mod_log_config
mod_mime
mod_setenvif
mod_alias
mod_authz_host
mod_rewrite

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.

If your site is full of images and javascripts, you will want to set “KeepAlive” as “on”, and consider other settings as well. “KeepAliveTimeout” should be kept small, like “5”. You want to keep the connection open long enough for all the data to flow to clients, but not so long that the connection is kept alive and doing nothing. For “MaxKeepAliveRequests”, set it higher, maybe twice the default whereabouts. This allows more requests to come through the connection, thus making things run more efficiently.

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.)

Share:Share on Facebook0Share on Google+0Tweet about this on Twitter0

leave a reply