summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2020-07-14 13:40:47 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2020-07-14 13:40:47 (GMT)
commit1503b1942bc17411626094ab746fe1de3231c2ef (patch) (side-by-side diff)
treeaa1e52945259f854cd44d9eb2aea3e158d9bdc5e
parentd916c2d98c58099854df898b0c6b002303b657ae (diff)
downloadacmeman-1503b1942bc17411626094ab746fe1de3231c2ef.tar.gz
acmeman-1503b1942bc17411626094ab746fe1de3231c2ef.tar.bz2
Fixes in the "apache" source mechanism.
* lib/App/Acmeman/Source/Apache.pm (examine_http_config): Provide default apache configuration only if the files.apache section was not provided by the user. Remove eventual scheme prefix from the server name.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--lib/App/Acmeman/Source/Apache.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/App/Acmeman/Source/Apache.pm b/lib/App/Acmeman/Source/Apache.pm
index a9a6195..8497e00 100644
--- a/lib/App/Acmeman/Source/Apache.pm
+++ b/lib/App/Acmeman/Source/Apache.pm
@@ -66,7 +66,8 @@ sub examine_http_config {
foreach my $sect ($app->section(-name => "macro")) {
if ($sect->value =~ m{^(?ix)letsencryptssl
\s+
- (.+)}) {
+ (.+)}
+ && ! $self->is_set(qw(files apache))) {
$self->set(qw(files apache argument), $1);
map {
if ($_->name =~ m{^(?ix)
@@ -93,8 +94,10 @@ sub examine_http_config {
}
foreach my $sect ($app->section(-name => "virtualhost")) {
- my ($server_name) = (map { $self->dequote($_->value) }
- $sect->directive('servername'));
+ my ($server_name) = (map {
+ (my $s = $self->dequote($_->value)) =~ s{^https?://}{};
+ $s
+ } $sect->directive('servername'));
my @server_aliases = map { quotewords('\s+', 0,
$self->dequote($_->value)) }
$sect->directive('serveralias');

Return to:

Send suggestions and report system problems to the System administrator.