Configurable directory path for challenge configuration file

This commit is contained in:
Joona Hoikkala 2015-12-07 11:07:31 +02:00
parent cd0ae93ddc
commit 6e3da9e043
3 changed files with 8 additions and 3 deletions

View file

@ -100,6 +100,9 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
help="Apache server root directory.")
add("vhost-root", default=constants.os_constant("vhost_root"),
help="Apache server VirtualHost configuration root")
add("challenge-location",
default=constants.os_constant("challenge_location"),
help="Directory path for challenge configuration.")
le_util.add_deprecated_argument(add, "init-script", 1)
def __init__(self, *args, **kwargs):

View file

@ -10,7 +10,8 @@ CLI_DEFAULTS_DEBIAN = dict(
enmod="a2enmod",
dismod="a2dismod",
le_vhost_ext="-le-ssl.conf",
handle_mods=True
handle_mods=True,
challenge_location="/etc/apache2"
)
CLI_DEFAULTS_CENTOS = dict(
server_root="/etc/httpd",
@ -19,7 +20,8 @@ CLI_DEFAULTS_CENTOS = dict(
enmod=None,
dismod=None,
le_vhost_ext="-le-ssl.conf",
handle_mods=False
handle_mods=False,
challenge_location="/etc/httpd/conf.d"
)
CLI_DEFAULTS = {
"debian": CLI_DEFAULTS_DEBIAN,

View file

@ -50,7 +50,7 @@ class ApacheTlsSni01(common.TLSSNI01):
super(ApacheTlsSni01, self).__init__(*args, **kwargs)
self.challenge_conf = os.path.join(
self.configurator.conf("server-root"),
self.configurator.conf("challenge-location"),
"le_tls_sni_01_cert_challenge.conf")
def perform(self):