Lost all data from server

It’s shame but I have lost almost all data from a server. The only one thing I’ve got is /etc/apache2 folder.
now I’m trying to sort out the certificate for my domain at the new server. After 2 days I haven’t found a solution yet.

  1. Is there a way to get back old keys and account?
  2. Can I use my domain name before certificate expiry?

=======================================================================
My domain is: karolburda.com

I ran this command: sudo certbot certonly --webroot -w karolburda.com/public_html -d karolburda.com -d www.karolburda.com

It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for karolburda.com
http-01 challenge for www.karolburda.com
Using the webroot path karolburda.com/public_html for all unmatched domains.
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. karolburda.com (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching https://karolburda.com/.well-known/acme-challenge/wXxAXOE6A6QMTl92troqMxCla1YlZjkM7aXnzKZmYQw: Connection refused, www.karolburda.com (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: DNS problem: NXDOMAIN looking up A for www.karolburda.com

IMPORTANT NOTES:

My web server is (include version): Apache/2.4.18

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

My hosting provider, if applicable, is: DigitalOcean

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

Not from Let's Encrypt.

Certainly.

The problem you're running into is that there aren't published DNS records for www.karolburda.com, and karolburda.com isn't responding to connections on port 80.

Not quite: http://karolburda.com/ is responding, but it's responding with a redirect to https://karolburda.com/, which results in "Connection refused".

@kburda You need to temporarily disable the redirect in the Apache configuration.

Thanks for quick response!

Let’s leave www it’s only an alias not a sub-domain. It was my mistake.

That’s why I am here. The only one thing I changed since last time I reinstalled system was that my site has got the certificate now. It uses same virtual host conf file as it did before. I can browse the site using ip address so I was sure it must be something with the certificate. Firewall is open to both 80 and 443. I checked virtual host file and it should work.
DNS records are A - karolburda.com and 3 NS.

Now I am completely lost.
What can be a reason site isn’t served at port 80? I tried to find solution to lost files and only one thing I found is to get new one. Should I get new account aswell?

Thanks!

Anyway, I don’t know how to use your suggestion.
I’ve tried to edit virtual host file - failed
I’ve checked mods and didn’t find anything.
certbot rollback - Certbot hasn’t modified your configuration, so rollback isn’t available.
Domain security policies are deleted. Googling didn’t help as well.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.