authorSergey Poznyakoff <>2018-10-06 08:45:01 (GMT)
committer Sergey Poznyakoff <>2018-10-06 08:45:01 (GMT)
commit4463698e4210bbf5d8c8cc152916bf8b52594141 (patch) (side-by-side diff)
parentab2566689e861fd9308ad986721400dee86f55ee (diff)
Support explicit declaration of server root directory in apache source configuration statement
* acmeman: Document apache source --server-root option. * lib/App/Acmeman/Source/ (new): Handle command line option. Declare '--server-root' option. (setup): Improve the SSLCipherSuite settings. (probe): Bail out if unable to determine server root.
Diffstat (more/less context) (show whitespace changes)
2 files changed, 19 insertions, 4 deletions
diff --git a/acmeman b/acmeman
index 83519f7..ea9198a 100755
--- a/acmeman
+++ b/acmeman
@@ -223,5 +223,5 @@ Use this source if all domains are described in the configuration file.
The B<apache> source module is the default. It scans B<httpd> configuration
-files as described in section B<APACHE>. One argument is allowed. If supplied,
+files as described in section B<apache>. One argument is allowed. If supplied,
it defines the apache configuration layout. Allowed values are: B<debian>,
B<slackware>, B<suse> and B<rh> (for Red Hat). Without arguments, the layout
@@ -366,5 +366,5 @@ setting.
- source = apache [LAYOUT]
+ source = apache [--server-root=DIR] [LAYOUT]
This is the default source. It assumes Apache httpd, version 2.4 or later
@@ -374,4 +374,8 @@ files. Allowed layout values are: B<debian>, B<slackware>, B<suse> and
B<rh> (for Red Hat). If not supplied, the layout is determined automatically.
+Use the B<--server-root> option to supply the name of the server root
+directory, if for some reason the module is unable to determine it
A special directory should be configured for receiving ACME challenges.
diff --git a/lib/App/Acmeman/Source/ b/lib/App/Acmeman/Source/
index 2041bb1..b429f89 100644
--- a/lib/App/Acmeman/Source/
+++ b/lib/App/Acmeman/Source/
@@ -10,8 +10,14 @@ use IPC::Open3;
use App::Acmeman::Apache::Layout;
use parent 'App::Acmeman::Source';
+use Getopt::Long qw(GetOptionsFromArray :config gnu_getopt no_ignore_case);
sub new {
my $class = shift;
- bless { _layout => new App::Acmeman::Apache::Layout(@_) }, $class;
+ my $server_root;
+ GetOptionsFromArray(\@_,
+ 'server-root=s' => \$server_root);
+ my $self = bless { _layout => new App::Acmeman::Apache::Layout(@_) }, $class;
+ $self->server_root($server_root) if $server_root;
+ return $self;
@@ -239,5 +245,5 @@ sub setup {
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCertificateFile /etc/ssl/acme/\$domain/cert.pem
SSLCertificateKeyFile /etc/ssl/acme/\$domain/privkey.pem
@@ -290,4 +296,9 @@ sub probe {
close $nullin;
close $nullout;
+ unless ($self->server_root) {
+ ::error("can't deduce server root directory");
+ ::error("use `source = apache --server-root=DIR' in [core] section of /etc/acmeman.conf to declare it");
+ exit(1);
+ }

Return to:

Send suggestions and report system problems to the System administrator.