I am attempting to obtain a certificate for the domain berrysmooth.ca (just for experimentation purposes). My ISP blocks port 80, so the default acme challenge will fail unless I specify an alternate port as discussed here.
When I run:
certbot certonly --http-01-port 9999 --webroot --webroot-path=/var/www/berrysmooth.ca -d berrysmooth.ca -d www.berrysmooth.ca
I get:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for berrysmooth.ca
http-01 challenge for www.berrysmooth.ca
Using the webroot path /var/www/berrysmooth.ca for all unmatched domains.
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. www.berrysmooth.ca (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://www.berrysmooth.ca/.well-known/acme-challenge/2tvmysVn9VL0vEW4wTRYbIHhvCYSeCfHu9dLn42U364: Timeout, berrysmooth.ca (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://berrysmooth.ca/.well-known/acme-challenge/SHmBaAhv-qPs0yk9R_6D6T7uNMNtpH3xEBCgc_V_pBY: Timeout
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: www.berrysmooth.ca
Type: connection
Detail: Fetching
http://www.berrysmooth.ca/.well-known/acme-challenge/2tvmysVn9VL0vEW4wTRYbIHhvCYSeCfHu9dLn42U364:
Timeout
Domain: berrysmooth.ca
Type: connection
Detail: Fetching
http://berrysmooth.ca/.well-known/acme-challenge/SHmBaAhv-qPs0yk9R_6D6T7uNMNtpH3xEBCgc_V_pBY:
Timeout
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A 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.
It appears that despite the http-01-port
option, the option is having no effect on the outgoing ACME challenge.
I am running a simple nginx configuration on debian 8 jesse, which listens to all requests to port 80, but forwarded to port 80 via my router's port forwarding configuration. My domain is pointed to my public IP, and I have verified this (port 9999 loads the site). My nginx config looks as follows:
server {
listen 80;
listen [::]:80;
root /var/www/berrysmooth.ca;
index index.html index.php index.htm index.nginx-debian.html;
server_name berrysmooth.ca www.berrysmooth.ca;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
location ~ /\.ht {
deny all;
}
location ~ /.well-known {
allow all;
}
}
I am hosting on proxmox 5 on my own server, and I have root access.
Can anyone advise a way to force the acme challenge to occur on port 9999
, not the default port 80
? Thanks in advance.