diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2019-10-23 14:38:56 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2019-10-23 14:38:56 +0300 |
commit | 4185f852471106b55ba430b81a1c5f09decdf16e (patch) | |
tree | cd162d896448872b1f70e7cc5583d14f469e440b | |
parent | 7aed29afbb8b8bdd2b23f08faea19b61e2ead8ff (diff) | |
download | acmeman-4185f852471106b55ba430b81a1c5f09decdf16e.tar.gz acmeman-4185f852471106b55ba430b81a1c5f09decdf16e.tar.bz2 |
Take into account ServerName if LetsEncryptReference is given.v3.02
* lib/App/Acmeman/Source/Apache.pm (examine_http_config): Take into account
ServerName if LetsEncryptReference is given.
* Changes: Update.
* lib/App/Acmeman.pm: Version 3.02
-rw-r--r-- | Changes | 3 | ||||
-rw-r--r-- | lib/App/Acmeman.pm | 2 | ||||
-rw-r--r-- | lib/App/Acmeman/Source/Apache.pm | 5 |
3 files changed, 7 insertions, 3 deletions
@@ -1,6 +1,9 @@ +3.02 2019-10-23 + - Take into account ServerName if LetsEncryptReference is given. + 3.01 2019-10-20 - Accept multiple hostnames in the ServerAlias directive 3.00 2019-10-19 - Switch to ACMEv2 diff --git a/lib/App/Acmeman.pm b/lib/App/Acmeman.pm index afc64e9..76b8fb1 100644 --- a/lib/App/Acmeman.pm +++ b/lib/App/Acmeman.pm @@ -21,13 +21,13 @@ use App::Acmeman::Config; use App::Acmeman::Domain qw(:files); use Data::Dumper; use Text::ParseWords; use App::Acmeman::Log qw(:all :sysexits); use feature 'state'; -our $VERSION = '3.01'; +our $VERSION = '3.02'; my $progdescr = "manages ACME certificates"; my $letsencrypt_root_cert_url = 'https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem'; diff --git a/lib/App/Acmeman/Source/Apache.pm b/lib/App/Acmeman/Source/Apache.pm index 1c0e677..58ba39e 100644 --- a/lib/App/Acmeman/Source/Apache.pm +++ b/lib/App/Acmeman/Source/Apache.pm @@ -94,13 +94,14 @@ sub examine_http_config { } } foreach my $sect ($app->section(-name => "virtualhost")) { my ($server_name) = (map { $self->dequote($_->value) } $sect->directive('servername')); - my @server_aliases = map { quotewords('\s+', 0, $self->dequote($_->value)) } + my @server_aliases = map { quotewords('\s+', 0, + $self->dequote($_->value)) } $sect->directive('serveralias'); my @d = map { if ($_->value =~ m{^(?ix) (?:letsencrypt(challenge|ssl|reference)) (?:\s+(.+))?}) { [lc($1),$self->dequote($2)] @@ -116,13 +117,13 @@ sub examine_http_config { $self->define_domain($server_name); $self->define_alias($server_name, @server_aliases); debug(3, "will handle ".join(',', $server_name, @server_aliases)); } elsif (my ($ref) = map { $_->[1] } grep { $_->[0] eq 'reference' } @d) { $self->set('domain', $ref, 'files', 'apache'); - $self->define_alias($ref, @server_aliases); + $self->define_alias($ref, $server_name, @server_aliases); } } return 1; } sub server_root { |