Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
recipes update alias config to meet GIS requirements Nov 23, 2014
spec fix chefspec run Jun 22, 2016
templates/default Added a missing dash Jun 29, 2015
.gitignore add specs to apache cookbook Nov 30, 2014
.kitchen.vagrant.yml switch to kitchen-dokken Jun 22, 2016
.kitchen.yml use the offical address for the apache tests Jun 22, 2016
.rubocop.yml update rake and gemfile Jun 22, 2016
Berksfile rubocop 0.27 is picky about the Berksfile Oct 31, 2014
CHANGELOG.md remove net-ssh version pin, because we removed ruby 1.9.3 support Jun 24, 2016
CONTRIBUTING.md update readme and add contributing section Dec 8, 2014
Gemfile remove net-ssh version pin, because we removed ruby 1.9.3 support Jun 24, 2016
Guardfile initial apache hardening project files Sep 29, 2014
README.md update README.md Jun 22, 2016
Rakefile remove net-ssh version pin, because we removed ruby 1.9.3 support Jun 24, 2016
gemfile.chef-11 remove net-ssh version pin, because we removed ruby 1.9.3 support Jun 24, 2016
metadata.rb update metadata Apr 28, 2017


apache-hardening (Chef cookbook)

Supermarket Build Status Code Coverage Dependencies Gitter Chat


This cookbook provides a secure overlay for apache configuration.


  • chef


  • Debian 7, 8
  • Ubuntu 14.04, 16.04
  • CentOS 6.8, 7.2
  • OracleLinux 6.8, 7.2


A sample role may look like:

    "name": "apache",
    "default_attributes": { },
    "override_attributes": { },
    "json_class": "Chef::Role",
    "description": "Apache Hardened Server Test Role",
    "chef_type": "role",
    "run_list": [


apache-hardening::hardening (default)

This recipe is an overlay recipe for the apache2 cookbook and applies apache-hardening::hardening

Add the following to your runlist and customize security option attributes


This hardening recipe installs the hardening but expects an existing installation of Apache2.

Security Options


For local testing you can use vagrant or docker to run tests locally. You will have to install Virtualbox and Vagrant or docker on your system. See Vagrant Downloads for a vagrant or Docker Downloads package suitable for your system. For all our tests we use test-kitchen. If you are not familiar with test-kitchen please have a look at their guide.

# Install dependencies
gem install bundler
bundle install

# Do lint checks
bundle exec rake lint

# fast test on one machine
bundle exec kitchen test default-ubuntu-1404

# test on all machines
bundle exec kitchen test

# for development
bundle exec kitchen create default-ubuntu-1404
bundle exec kitchen converge default-ubuntu-1404
bundle exec kitchen verify default-ubuntu-1204

Contributors + Kudos


See contributor guideline.

License and Author

  • Author:: Deutsche Telekom AG

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.