server-configs-apache 0,1,2,0,3,0,11,1 editorconfig travis-ci Bower npm

Apache HTTP server boilerplate configs

Apache Server Configs

This project is currently unmaintained. Please get in touch if you’d like to take over maintainership. ~April, 2017

Build Status devDependency Status

Apache Server Configs is a collection of boilerplate configurations that can help your server improve the web site’s performance and security, while also ensuring that resources are served with the correct content-type and are accessible, if needed, even cross-domain.

Getting Started

There are a few options for getting the Apache server configs:

  • Download the zip archive
  • Install them via:
    • npm: npm install --save-dev apache-server-configs
    • Bower: bower install --save-dev apache-server-configs


If you have access to the main server configuration file (usually called httpd.conf), you should add the logic from the .htaccess file in, for example, a <Directory> section in the main configuration file. This is usually the recommended way, as using .htaccess files slows down Apache!

If you don’t have access, which is quite common with hosting services, just copy the .htaccess file in the root of the website.

Also note that some configurations won’t have any effect if the appropriate modules aren’t enabled. So, in order for everything to work as intended, you need to ensure the you have the following Apache modules enabled: * mod_autoindex.c (autoindex_module) * mod_deflate.c (deflate_module) * mod_expires.c (expires_module) * mod_filter.c (filter_module) * mod_headers.c (headers_module) * mod_include.c (include_module) * mod_mime.c (mime_module) * mod_rewrite.c (rewrite_module) * mod_setenvif.c (setenvif_module)

For more detailed information on configuration files and how to use them, please check the appropriate Apache documentation:


  • Apache v2.2.0+

  • Browsers:

    • Chrome
    • Firefox 4+
    • Internet Explorer 8+
    • Opera 12+
    • Safari 5+


Anyone and everyone is welcome to contribute, but before you do, please take a moment to review the guidelines.


Apache Server Configs is only possible thanks to all the awesome contributors!


The code is available under the MIT license.

Related Repositories



Apache HTTP server boilerplate configs ...



Apache HTTP server boilerplate configs ...

Top Contributors

alrra paulirish mathiasbynens necolas mikealmond rros shichuan h5bp-bot adeelejaz WraithKenny AD7six jingman mattbrundage redoPop drublic laukstein clarkni5 Phize mikewest ismay philwareham ffxsam disusered christianbundy dustinwhittle mitsurugi kikito fhemberger codler hkdobrev


package version
dev @alrra/travis-scripts ^1.1.1
mocha ^2.1.0


-   2.14.0 zip tar
-   2.13.0 zip tar
-   2.12.0 zip tar
-   2.11.0 zip tar
-   2.10.0 zip tar
-   2.9.0 zip tar
-   2.8.0 zip tar
-   2.7.1 zip tar
-   2.7.0 zip tar
-   2.6.0 zip tar
-   2.5.0 zip tar
-   2.4.1 zip tar
-   2.4.0 zip tar
-   2.3.0 zip tar
-   2.2.0 zip tar
-   2.1.0 zip tar
-   2.0.0 zip tar
-   1.1.0 zip tar
-   1.0.0 zip tar