Certbot not working on Ubuntu server with apache2

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. crt.sh | 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: gendrox.dev

I ran this command: sudo certbot --apache

It produced this output: Saving debug log to /var/log/letsencrypt/letsencrypt.log

Which names would you like to activate HTTPS for?
We recommend selecting either all domains, or all domains in a VirtualHost/server block.


1: gendrox.dev


Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):
Requesting a certificate for gendrox.dev

Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
Domain: gendrox.dev
Type: unauthorized
Detail: 44.227.76.166: Invalid response from porkbun.com | parked domain "\n\n<html lang="en">\n \n\n\n<script async src="https://www"

Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet.

Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

My web server is (include version): Apache/2.4.58 (Ubuntu)

The operating system my web server runs on is (include version): Ubuntu 24.04.1 LTS

My hosting provider, if applicable, is: Self hosting

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): no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 3.1.0

Just from that message alone it looks like your DNS is not setup to use the public IP address for your Apache server. Do you know why requests to your domain reply with a "Parked Domain" page?

Your DNS currently has these two IP. Normally this is just one IP for your Apache

gendrox.dev. 0 IN A 44.227.76.166
gendrox.dev. 0 IN A 44.227.65.245
1 Like

Wich should i remove?

It should be the public IP for your Apache server. If you are self-hosted does that mean a residential setup? The public IP is probably in your router's console.

Or, there are many websites that show your public IP. Such as:

curl -4 https://ifconfig.io

You may need to setup port forwarding (or NAT) in your router as well.

You will need to learn how to make your server available on the public internet. Once you have that working try getting a cert again.

The Let's Debug test site is very helpful to test comms of new systems: https://letsdebug.net

UPDATE: Although note the Let's Debug site will say OK right now on its summary page. But, if you look at the Verbose page output you can see requests do not reach your Apache server. They are reaching an openresty server. Let's Debug

2 Likes

None of those are my public ips, or do you mean i should set them to that, and i did want to port foward my server but i dont want to do that on the 80 http port but rather the 443 https port but if i do that currently because i have no certificate it doesnt work. If i do foward port 80, how should i proceed?

Sounds like you have a lot to learn about setting up a server on the public internet. I don't know the best place to get advice about that.

Once your Apache can be reached from the public internet you can try getting a cert and we can help if you have problems with that. We are not a general purpose forum for setting up systems from scratch.

1 Like

So it is accesibble but i still dont know how to proceed.