Question

Issue with certbot certificate renewal and "Unable to connect to server" when accessing one domain

Posted December 26, 2020 297 views
ApacheNetworkingDeploymentLet's EncryptInitial Server SetupUbuntu 20.04

Hi, there.
I hope the holidays go well!

I have just recently signed up for a VPS (I believe it is called) (the smallest one) at Digital Ocean to host two simple websites of mine (qasimfarms.com and eidcattle.com). This was my first time interacting with Linux on a server and Apache, and after installing the LAMP image on Ubuntu 20.04 on my droplet, I was able to follow along the excellent resources provided herein and set up virtual hosts for my two domains, obtain SSL certificates for the two domains using Let’s Encrypt, and install WordPress for one of my websites (qasimfarms.com) (the other one, eidcattle.com, is simple hardcoded HTML/CSS).
I am facing two main issues presently, wherein any assistance would be greatly appreciated (have gone through the three tutorials from here that I used and elsewhere, but I haven’t been able to figure where I am going wrong):

  • Although I was able to secure a certificate each for each for each of my sites with sudo certbot --apache -d eidcattle.com -d www.eidcattle.com and sudo certbot --apache -d qasimfarms.com -d www.qasimfarms.com respectively, I am unable to run sudo cerbot renew --dry-run without an error. The http-01 challenges fail for eidcattle.com, www.eidcattle.com, qasimfarms.com, and www.qasimfarms.com, and the error type is either “dns” or “unauthorized” depending on the attemmpt. This seems to suggest that there is something up with my DNS records, but these I have adjusted approximately two days prior using the Digital Ocean interface and name servers, so I’m not sure if the issue lay there it should still persist. I was also thinking that if the issue lay there I shouldn’t have been ale to obtain the certificates in the first place nor access my domains in the browser.

  • The above might be closely linked with my second issue, in that although my first website (eidcattle.com) seems to be working well, my second website (qasimfarms.com) which uses Wordpress is only working a slight portion of the time, and I mostly get the message “Unable to connect to server” in Firefox and Edge. After some refreshes in Edge, the website sometimes begins to magically work for a minute or two on both Firefox and Edge, before becoming nonoperational again as I am in the process of WordPress edits. I was thinking that if this was a DNS issue, I should be getting a message that DNS look up failed perhaps, and that the site should either be working or it should not. Accordingly, I was thinking the issue might lay in my apache configuration files for virtual host though I have been unable to find anything wrong with them despite my best efforts nor does sudo apache2ctl configtest give anything except:
    apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message.
    I have accordingly, uploaded the contents of my .conf files at the following Pastebin link: https://pastebin.com/0uuZDupk.

For reference, my droplet is “1 GB Memory / 25 GB Disk / BLR1 - LAMP on Ubuntu 20.04”.
Your assistance is greatly appreciated, and my apologies for the long post.

Kind Regards,
Abdullah

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi there @AlTalib,

It looks like that the eidcattle.com domain has too many nameservers:

DNS problem

I would recommend deleting the extra nameservers and using only the DigitalOcean nameservers or the nameservers of your other DNS provider in order not to get any DNS conflicts.

Let me know how it goes!
Regards,
Bobby

  • Hi, Bobby.

    Thanks a lot for the input. I’ll certainly do as advised and remove the other name servers, and let you know how it goes. Hopefully, it goes well.
    Also, my apologies for the very belated response, but somehow I didn’t receive a notification and didn’t realize you had responded.

    Kind Regards,
    Abdullah