Apache

Optimize website speed with mod_expire and mod_deflate

PDF

This tutorial explain how to speed up your Apache webserver with mod_deflate and mod_expire.
mod_expire controls the setting of the Expires HTTP header and the max-age directive of the Cache-Control HTTP header in server responses. These HTTP headers are an instruction to the client about the document's validity and persistence. If cached, the document may be fetched from the cache rather than from the source until this time has passed. After that, the cache copy is considered "expired" and invalid, and a new copy must be obtained from the source.

Like mod_gzip, mod_deflate allows you to compress files before they are served to the client, saving your server traffic.
Compressing causes a increased load on the server but the clients connections times decrease a lot, it might decrease the response times with 25% to 50%. The Apache package shipped with CentOS 5 is not compiled with mod_gzip but mod_deflate instead. With mod_deflate you can compress HTML, XML, CSS, text, JavaScript, ect.

Tags:
 

Disable Apache TRACE Request Method

PDF
TRACE is used as an input data echo mechanism for the http protocol. This request method is commonly used for debug and other connection analysis activities. Like most other webserver vendors, Apache enables the TRACE Request Method by default. I would suggest to disable the TRACE Request Methods, unless you really need it on your webserver.
 

Create and use self-signed SSL Certificate with Apache

PDF

A self-signed SSL Certificate can be used for testing purposes or on websites where the visitors are people who know you and trust you. For situations where you ask for credit card or other payment information I strongly advice you to use a signed certificate
(Make sure openssl is installed on your system, on a typically installation of CentOs it is installed by default)

The first step is to generate the private key:

Tags:
 

Apache URL Rewriting

PDF

Apache mod_rewrite is a functional, flexible module to rewrite URL's on the fly. You can use it to create fancy, SEO friendly URL's, create redirect pages and prevent hotlinking. Understanding of regular expressions is recommended as mod_rewrite makes use of them.

 

Block or redirect using mod_geoip

PDF

Installing mod_geoip allows you to block or redirect traffic based on the geografical location of the client using the IP-address of the client. mod_geoip for CentOS is available at the EPEL repository. If you haven't setup the EPEL repository follow the instructions explained on their website. I asume you allready installed Apache. Download and install mod_geoip, GeoIP and the related libraries:

 
  • «
  •  Start 
  •  Prev 
  •  1 
  •  2 
  •  Next 
  •  End 
  • »
Page 1 of 2

Search






You are here: Home Howtos and FAQs Apache