certbot/certbot-apache/certbot_apache/tests
Joona Hoikkala fd6702b869 Fix CentOS 6 installer issue (#6784)
In CentOS 6 default httpd configuration, the `LoadModule ssl_module ...` is handled in `conf.d/ssl.conf`. As the `VirtualHost` configuration files in `conf.d/` are loaded in alphabetical order, this means that all files that have `<IfModule mod_ssl.c>` and are loaded before `ssl.conf` are effectively ignored. This PR moves the `LoadModule ssl_module` to the main `httpd.conf` while leaving a conditional `LoadModule` directive in `ssl.conf`.

Features
 - Reads the module configuration from `ssl.conf` in case some modifications to paths have been made by the user.
 - Falls back to default paths if the directive doesn't exist.
 - Moves the `LoadModule` directive in `ssl.conf` inside `<IfModule !mod_ssl.c>` to avoid printing warning messages of duplicate module loads.
 - Adds `LoadModule ssl_module` inside of `<IfModule !mod_ssl.c>` to the top of the main `httpd.conf`.
 - Ensures that these modifications are not made multiple times.

Fixes: #6606

* Fix CentOS6 installer issue

* Changelog entry

* Address review comments

* Do not enable mod_ssl if multiple different values were found

* Add test comment

* Address rest of the review comments

* Address review comments

* Better ifmodule argument checking

* Test fixes

* Make linter happy

* Raise an exception when differing LoadModule ssl_module statements are found

* If IfModule !mod_ssl.c with LoadModule ssl_module already exists in Augeas path, do not create new LoadModule directive

* Do not use deprecated assertion functions

* Address review comments

* Kick tests

* Revert "Kick tests"

This reverts commit 967bb574c2.

* Address review comments

* Add pydoc return value to create_ifmod
2019-04-02 09:26:58 -07:00
..
apache-conf-files Fix faulty test (#6816) 2019-03-05 18:30:33 -08:00
testdata Fix CentOS 6 installer issue (#6784) 2019-04-02 09:26:58 -07:00
__init__.py s/Let's Encrypt/Certbot certbot-apache 2016-04-13 16:36:53 -07:00
augeas_configurator_test.py Switch from nose to pytest (#5282) 2017-12-01 10:59:55 -08:00
autohsts_test.py assertNotEquals --> assertNotEqual 2018-10-31 17:59:44 -07:00
centos6_test.py Fix CentOS 6 installer issue (#6784) 2019-04-02 09:26:58 -07:00
centos_test.py Merge branch 'master' into warnings-are-errors 2018-10-30 17:18:00 -07:00
complex_parsing_test.py Distribution specific override functionality based on class inheritance (#5202) 2017-12-04 11:49:18 -08:00
configurator_test.py Add a test to ensure test coverage regardless of the vhost order (#6873) 2019-03-27 10:10:52 -07:00
debian_test.py Make Apache control script and binary paths configurable on command line (#6238) 2018-08-02 08:17:38 -07:00
display_ops_test.py Apache plugin wildcard support for ACMEv2 (#5608) 2018-02-28 11:31:47 -08:00
entrypoint_test.py Distribution specific override functionality based on class inheritance (#5202) 2017-12-04 11:49:18 -08:00
gentoo_test.py Merge branch 'master' into warnings-are-errors 2018-10-30 17:18:00 -07:00
http_01_test.py Apache plugin: configure all matching domain names to be able to answer HTTP challenge. (#6729) 2019-02-06 10:02:35 -08:00
obj_test.py Test coverage & fix 2016-06-25 12:06:43 -07:00
parser_test.py Apache plugin: configure all matching domain names to be able to answer HTTP challenge. (#6729) 2019-02-06 10:02:35 -08:00
util.py Apache plugin: configure all matching domain names to be able to answer HTTP challenge. (#6729) 2019-02-06 10:02:35 -08:00