Certbot returning 502

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: mail.paxtonpenguin.com (i'm trying to set up a mail server which needs a web server)

I ran this command: sudo certbot -v

It produced this output: Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems: Domain: mail.paxtonpenguin.com Type: unauthorized Detail: 2606:4700:3032::6815:542e: Invalid response from http://mail.paxtonpenguin.com/.well-known/acme-challenge/bOVkf-UovCeygI_cO9-1TyZ4pDvLrTvkbiWZ112xDOA: 502

My web server is (include version): apache2/2.4.65

The operating system my web server runs on is (include version): debian 12

I can login to a root shell on my machine: yes

I'm using a control panel to manage my site: no

The version of my client is: certbot 2.1.0

other information: paxtonpenguin.com also runs apache2 and i'm using a reverse proxy because i'm running the mail subdomain from a raspberry pi

I think that belongs to cloudflare. Is that intentional?

Note the page at that URL: http://mail.paxtonpenguin.com/.well-known/acme-challenge/bOVkf-UovCeygI_cO9-1TyZ4pDvLrTvkbiWZ112xDOA

Something is going on with your server. Check its error logs please.

yes, i use cloudflare

DNS lookup failure for: 10.0.0.213.well-known returned by /.well-known/acme-challenge/bOVkf-UovCeygI_cO9-1TyZ4pDvLrTvkbiWZ112xDOA is the error apache2 is getting

There's at the very least some missing whitespace in your Apache config. I assume 10.0.0.213 is your other server in the local network.

213 is the raspberry pi

apache sites-avaliable - Pastebin.com are the sites-avaliable configs (first is the normal and the second is the ssl one, both on the main server)

I'm not sure, but... try adding a / after 213 on lines 98-99?

2 Likes

Definitely needs a / on the end of those two lines

But, also need the / for the port 80 VHost too on lines 41 and 42

The error message is for HTTP so I think that is the VHost error rather than port 443 one

Even if this is not the only cause of the problem all 4 lines should be changed

3 Likes

adding slashes after 213 fixed it

i don't know why i didn't have them

3 Likes