Certbot: Unable to install the certificate into Apache after deleting the VirthualHost configuration files

Thanks for your great support so far! A lot of big companies could learn a thing or two from what volunteers deliver here!

3 Likes

I wanna give you another :heart:, but I've been limited for a while. :slightly_smiling_face:

So have this instead:
:star2:

I'll check back on this topic later. Hopefully the devs will get to this sometime this week.

2 Likes

Awww, it feels just as good. Thank you very much and keep up the great work!

2 Likes

Will do. :heart_eyes:

1 Like

Before I go... @rg305 if you happen to be around, can you please audit this topic for me in case I missed something.

1 Like

Apache!

@mart-w, Please show the output of:
sudo apachectl -S

1 Like

You've got the gamut already, Rudy. :slightly_smiling_face:

From what I could tell, he's running as root.

2 Likes

It is strange then how it asks which name:

When only one name is shown in:

2 Likes

Is this that which you seek?

1 Like

/sites-available/ "sites" are not necessarily enabled "sites".
So...maybe.
[but probably not]

What is in /sites-enabled/ ?

2 Likes

Here are both of them:

2 Likes

It should all be here, somewhere. I dug deep. Hopefully you'll see something I missed.

2 Likes

This seems... interesting
RewriteRule . /usr/share/wordpress/index.php [L]

This is...problematic

curl -Iki martinwurm.photo
curl: (7) Failed to connect to martinwurm.photo port 80: Connection refused

curl -Iki www.martinwurm.photo
curl: (7) Failed to connect to www.martinwurm.photo port 80: Connection refused

2 Likes

The whole rewrite section seems wackedy.
It ends with a condition statement !

If/when "this condition" do what?

2 Likes

[this is looking like a good candidate for --webroot authentication]

2 Likes

@_az

You may know how to address this issue right off.

Executive Summary:
@mart-w found a mistake in his VirtualHost configuration file martinwurm.photo.conf, which he then deleted along with martinwurm.photo-le-ssl.conf. He managed to recreate martinwurm.photo.conf then tried to have certbot --apache reinstall the existing certificate, which resulted in:

Most every configuration file is posted and available for digest in this topic. They are very clean. I prompted @mart-w for everything I could think of and came up empty-handed.

The changes I had @mart-w make were:

  • delete and recreate his certificate
  • delete his certificate and create a new certificate with a different name
  • rename his debug log file

@mart-w tried several other harmless things himself before creating the topic that are outlined in his initial post from which I took the quoted error message.

3 Likes

Certbot might be picking up that reference from one of the Apache configuration checkpoints in /var/lib/letsencrypt/backups/.

You could try renaming/moving that directory and then trying to install the certificate again:

certbot install --apache --cert-name photo
4 Likes

@_az

That makes sense. Thanks. I knew there had to be more to it. :slightly_smiling_face:

By the way, I'd love your feedback on the handbook I'm trying to draft, particularly with the questions about certbot's technicalities:
https://community.letsencrypt.org/t/discussion-the-certificate-handbook/133296/51?u=griffin

There's some certbot comedy in that topic too. :slightly_smiling_face:

2 Likes

This is by design – while I didn’t change the server’s configuration at all, I did shut down the Apache service to avoid people messing with my incomplete WordPress setup while I’m away. I did, however, remove the conditional you mentioned now. I have to shamefully admit: I just copied and pasted a section of recommended code from the Debian wiki there after skimming over it and deciding that it looks plausible. According to the wiki, this is necessary if you want your wp-content outside /usr/share/ with a packaged install.

3 Likes

That did indeed solve the issue. Thank you very much!

3 Likes