Hi -- I've been pulling my hair out over here trying to enable https on my home server running nextcloud and piwigo using Apache (details at the bottom). The http site works, but when I run certbot
all I get is "Timeout during connect (likely firewall problem)". My firewall is ufw, and allows ports 80 and 443. I even tried disabling ufw completely and running certbot, but it didn't help.
My sites-enabled folder for Apache has two files: photos.marcevanstein.com.conf
, and cumulonimbus.marcevanstein.com.conf
. photos.marcevanstein.com.conf
looks like:
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerName photos.marcevanstein.com
ServerAlias www.photos.marcevanstein.com
ServerAdmin [redacted]
DocumentRoot /var/www/html/piwigo
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
AliasMatch /.well-known/acme-challenge/(.*)$ /var/lib/letsencrypt/http_challenges/$1
<directory /var/lib/letsencrypt/http_challenges>
AllowOverride None
Require all granted
</directory>
</VirtualHost>
The AliasMatch
part was an experiment to see if I could access something under /.well-known/acme-challenge
. I put a test file there (http://photos.marcevanstein.com/.well-known/acme-challenge/test), and it is accessible it seems.
cumulonimbus.marcevanstein.com.conf
looks similar, but without the AliasMatch part.
Anyway, I've been at this for several days, and I clearly just don't understand enough about how these things work to be able to figure it out on my own. Thanks in advance for any help you can provide!
REQUESTED DETAILS
My domain is: photos.marcevanstein.com
, www.photos.marcevanstein.com
,cumulonimbus.marcevanstein.com
, and www.cumulonimbus.marcevanstein.com
(none of them are working)
I ran this command: sudo certbot --apache
It produced this output:
Requesting a certificate for cumulonimbus.marcevanstein.com and 3 more domains
Performing the following challenges:
http-01 challenge for cumulonimbus.marcevanstein.com
http-01 challenge for photos.marcevanstein.com
http-01 challenge for www.cumulonimbus.marcevanstein.com
http-01 challenge for www.photos.marcevanstein.com
Waiting for verification...
Challenge failed for domain cumulonimbus.marcevanstein.com
Challenge failed for domain photos.marcevanstein.com
Challenge failed for domain www.cumulonimbus.marcevanstein.com
Challenge failed for domain www.photos.marcevanstein.com
http-01 challenge for cumulonimbus.marcevanstein.com
http-01 challenge for photos.marcevanstein.com
http-01 challenge for www.cumulonimbus.marcevanstein.com
http-01 challenge for www.photos.marcevanstein.com
Cleaning up challenges
Some challenges have failed.
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: cumulonimbus.marcevanstein.com
Type: connection
Detail: Fetching
http://cumulonimbus.marcevanstein.com/.well-known/acme-challenge/WKbW3iukK000shRb7L_ZrWl3XVIMYqDlI0hnwQN-ZJI:
Timeout during connect (likely firewall problem)
Domain: photos.marcevanstein.com
Type: connection
Detail: Fetching
http://photos.marcevanstein.com/.well-known/acme-challenge/RhBJX6ZG_IfpKMVSGtPnVCZSHo-gSLbXfEoqm9uVVy8:
Timeout during connect (likely firewall problem)
Domain: www.cumulonimbus.marcevanstein.com
Type: connection
Detail: Fetching
http://www.cumulonimbus.marcevanstein.com/.well-known/acme-challenge/kNzFZCKuzcSEiTejPC8SXkDUvxP92UpXvuYkI9H2gsk:
Timeout during connect (likely firewall problem)
Domain: www.photos.marcevanstein.com
Type: connection
Detail: Fetching
http://www.photos.marcevanstein.com/.well-known/acme-challenge/RCWNA6hR0ZGfbl3PtkX405YqovXVSNWp1CjesKSrUaM:
Timeout during connect (likely firewall problem)
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you're using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
My web server is (include version): Apache, running on a home server
The operating system my web server runs on is (include version): Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-73-generic x86_64)
My hosting provider, if applicable, is: Home server, although the DNS is managed through asmallorange
via cpanel.
I can login to a root shell on my machine (yes or no, or I don't know): yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): for setting up the DNS to point to the server, yes, but otherwise no
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): certbot 1.15.0, installed via snap