I’m at my wit’s end and have thoroughly messed up my letsencrypt/certbot setup, to the effect that neither my domain nor subdomain work anymore.
I have a domain (velko.men) which I self-host, with DNS services provided by the Norwegian webhost Domeneshop.
The main domain points to one local IP. The machine on this IP serves my Nextcloud, we can call it Box 1 for clarity. This is an Odroid ARM box, with Nextcloudpi installed on top of Armbian Buster. Box 1 has had a working Letsencrypt setup for some weeks.
I thought I’d like to self-host a web radio station on its own subdomain, so I installed regular Ubuntu server on an old laptop (Box 2), installed Azuracast via Docker, changed my DNS setup to add a subdomain (hjarteleg.velko.men) and set up reverse proxy on Box 1 to point to Box 2. I did this by adding a “domain.conf” file in
<VirtualHost *:80> ServerName hjarteleg.velko.men <Proxy *> Order deny,allow Allow from all </Proxy> <Location /> ProxyPass http://LAN_IP_HERE/ ProxyPassReverse http://LAN_IP_HERE/ </Location> </VirtualHost> <VirtualHost *:443> ServerName hjarteleg.velko.men <Proxy *> Order deny,allow Allow from all </Proxy> <Location /> ProxyPass https://LAN_IP_HERE/ ProxyPassReverse https://LAN_IP_HERE/ </Location> </VirtualHost>
I followed this by
sudo apache2ctl -k graceful on Box 1 to make Apache load the new config.
I also ran
sudo a2enmod proxy_http and
sudo a2enmod proxy to make sure Apache would function as a reverse proxy.
Then, on Box2, I ran the recommended certbot command inside Docker:
./docker.sh letsencrypt-create hjarteleg.velko.men
This seems to have been successful, but after this, none of my domains have worked. The Firefox error is
To overcome the problem, I have tried
- Uninstalling Azuracast on Box 2 (and, I hoped, also the certificate I obtained) and reinstalling. No change.
- Trying to make a wildcard DNS record on Box 1, using my webhost’s certbot DNS plugin and their API keys they provided. The result seems to have been successful, but none of my domains work.
- Checked which is the default domain on Box 1 with
apache2ctl -S. The result indicated that my new subdomain, hjarteleg.velko.men, was the new default domain.
- Tried to rename the files in
/etc/apache2/sites-availableon Box 1 to make the default domain appear first, because I read that Apache reads the files in alphabetical order(!), and restarted Apache. The result of
apache2ctl -Snow omits the subdomain altogether:
*:80 localhost (/etc/apache2/sites-enabled/000-default.conf:1)
*:4443 localhost (/etc/apache2/sites-enabled/ncp.conf:2)
Main DocumentRoot: “/var/www/html”
Main ErrorLog: “/var/log/apache2/error.log”
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
User: name=“www-data” id=33
Group: name=“www-data” id=33
Needless to say, none of my domains work, and I am at loss. Help is appreciated.