diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2019-10-21 13:53:46 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2019-10-21 13:53:46 +0300 |
commit | 7aed29afbb8b8bdd2b23f08faea19b61e2ead8ff (patch) | |
tree | ba27200023a09b29bc615aaa97ecbd3543059ee4 | |
parent | 6183e90837e16fe162aa680c08b56d426d992d75 (diff) | |
download | acmeman-7aed29afbb8b8bdd2b23f08faea19b61e2ead8ff.tar.gz acmeman-7aed29afbb8b8bdd2b23f08faea19b61e2ead8ff.tar.bz2 |
Accept multiple hostnames in the ServerAlias directivev3.01
-rw-r--r-- | Changes | 3 | ||||
-rw-r--r-- | lib/App/Acmeman.pm | 2 | ||||
-rw-r--r-- | lib/App/Acmeman/Source/Apache.pm | 3 |
3 files changed, 6 insertions, 2 deletions
@@ -1,6 +1,9 @@ +3.01 2019-10-20 + - Accept multiple hostnames in the ServerAlias directive + 3.00 2019-10-19 - Switch to ACMEv2 2.02 2019-09-11 - Fix the "apache" source diff --git a/lib/App/Acmeman.pm b/lib/App/Acmeman.pm index b54f7a4..afc64e9 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.00'; +our $VERSION = '3.01'; 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 77d7e23..1c0e677 100644 --- a/lib/App/Acmeman/Source/Apache.pm +++ b/lib/App/Acmeman/Source/Apache.pm @@ -9,12 +9,13 @@ use File::Spec; use App::Acmeman::Apache::Layout; use App::Acmeman::Log qw(:all); use parent 'App::Acmeman::Source'; use Getopt::Long qw(GetOptionsFromArray :config gnu_getopt no_ignore_case); use Apache::Defaults; use Apache::Config::Preproc; +use Text::ParseWords; sub new { my $class = shift; my $server_root; GetOptionsFromArray(\@_, 'server-root=s' => \$server_root); @@ -93,13 +94,13 @@ 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 { $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)] |