Skip to content
Whenever I setup a LAMP stack, here is my http.conf
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

The Perfect Apache Configuration

I've spent quite a bit of time compiling what I find to be optimial to me and my server. Feel free to fork this and make it your own.


Copy and paste the contents of http.conf into /apache2/httpd.conf

You can also copy and paste into .htaccess (however this is slower!)


- HTML5BoilerPlate: - W3 Edge: - Yahoo! Best Practices: - Caching Tutorial: - Personal experience running Amazon AWS instances


v1.3 - 2016.12.28

  • Syntax changes for Apache 2.4.4

v1.2 - 2013.07.01

  • Added DefaultCharset
  • Added Header append Vary: Accept-Encoding

v1.1 - 2012.06.13

  • Moved CSS and JS from 1 day to 1 week

v1.0 - 2012.06.05

  • Initial release


- If you break Apache, then you may not have all the modules turn on. - This configuration works best for my needs. Your needs may differ.
You can’t perform that action at this time.