My domain is:
.sjuharadtradservice.se,sjuharadtradservice.se,.7htradservice.se,7htradservice.se
I ran this command:
certbot --manual -d "*.sjuharadtradservice.se,sjuharadtradservice.se,*.7htradservice.se,7htradservice.se" --preferred-challenges=dns -q --manual-auth-hook /etc/nsd/certbot.pl --manual-cleanup-hook /etc/nsd/cleanup.sh --agree-tos --email <**HIDDEN**> --installer apache
It produced this output:
Missing command line flag or config entry for this setting:
Which VirtualHosts would you like to install the wildcard certificate for?
File: /etc/apache2/sites-enabled/000-default.conf
Addresses: *:80
Names: www.7htradservice.se, sjuharadtradservice.se, www.sjuharadtradservice.se, 7htradservice.se
HTTPS: No
?
My web server is (include version):
Apache2
The operating system my web server runs on is (include version):
Debian bookworm (RaspiOS-Lite)
My hosting provider, if applicable, is:
I can login to a root shell on my machine (yes or no, or I don't know):
yes
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot):
certbot 2.1.0
Contents of certbot.pl:
#!/usr/bin/perl
if ($ENV{'CERTBOT_DOMAIN'} =~ m/sju/) {
open(DNSFILE, ">>/etc/nsd/sju.zone");
print DNSFILE "_acme-challenge.".$ENV{'CERTBOT_DOMAIN'}.". IN TXT \"".$ENV{'CERTBOT_VALIDATION'}."\"\n";
close(DNSFILE);
}
else
{
open(DNSFILE, ">>/etc/nsd/7h.zone");
print DNSFILE "_acme-challenge.".$ENV{'CERTBOT_DOMAIN'}.". IN TXT \"".$ENV{'CERTBOT_VALIDATION'}."\"\n";
close(DNSFILE);
}
system('/usr/sbin/nsd-control reload');
Contents of cleanup.sh:
#!/bin/sh
cp /etc/nsd/7h.backup /etc/nsd/7h.zone
cp /etc/nsd/sju.backup /etc/nsd/sju.zone
nsd-control reload
I wonder, how do I supply which VirtualHost -i apache should apply the certificate on?
I can't find this in the documentation, how I supply a command-line to specify which virtualhost I should apply the certificate for.
Seems the certificate went through tough, so the issuance works, just the install that doesn't work:
Guess it would be better to write a own --deploy-hook, but theres no documentation or examples on that either.
Only the auth-hook and cleanup-hook I could find documentation on.