A simple Ansible role for installing and configuring the Apache web server for RHEL/CentOS 7 and Fedora 21+. Specifically, the responsibilities of this role are to:
- Install the necessary packages;
- Maintain the main configuration file;
- Maintain the configuration file for
mod_ssl
. - Install support for scripting language (currently only PHP)
HTTPS/TLS is enabled, by default using the standard self-signed certificate. You can provide your own certificate by setting the appropriate role variables.
Currently, no virtual hosts or other features are provided.
- The firewall settings are not managed by this role.
- If you want to use custom certificates, you have to make sure that they are installed on the system before applying this role.
If no variables are set, applying this role will result in a configuration equivalent to the default install. Consequently, no variables are required.
Variable | Default | Comments (type) |
---|---|---|
httpd_AccessLog_ssl |
logs/ssl_access_log | |
httpd_DocumentRoot |
'/var/www/html' | |
httpd_ErrorLog_ssl |
logs/ssl_error_log | |
httpd_ErrorLog |
logs/error_log | |
httpd_Listen_ssl |
443 | |
httpd_Listen |
80 | |
httpd_LogLevel_ssl |
warn | |
httpd_LogLevel |
warn | |
httpd_SSLCACertificateFile |
- | |
httpd_SSLCertificateChainFile |
- | |
httpd_SSLCertificateFile |
/etc/pki/tls/certs/localhost.crt | |
httpd_SSLCertificateKeyFile |
/etc/pki/tls/private/localhost.key | |
httpd_SSLCipherSuite |
See default variables | |
httpd_SSLHonorCipherOrder |
'on' | |
httpd_SSLProtocol |
'all -SSLv3 -TLSv1' | |
httpd_ServerAdmin |
root@localhost | |
httpd_ServerRoot |
'/etc/httpd' | |
httpd_ServerTokens |
Prod | See documentation |
httpd_scripting |
'none' | Allowed values: php |
No dependencies.
See the test playbooks in either the Vagrant or Docker test environment. See the section Testing for details.
There are two types of test environments available. One powered by Vagrant, another by Docker. The latter is suitable for running automated tests on Travis-CI. Test code is kept in separate orphan branches. For details of how to set up these test environments on your own machine, see the README files in the respective branches:
- Vagrant: vagrant-tests
- Docker: docker-tests
Issues, feature requests, ideas are appreciated and can be posted in the Issues section.
Pull requests are also very welcome. The best way to submit a PR is by first creating a fork of this Github project, then creating a topic branch for the suggested change and pushing that branch to your own fork. Github can then easily create a PR based on that branch.
2-clause BSD license, see LICENSE.md
- Bert Van Vreckem (maintainer)
- Richard Marko