Hi guys,
I have a problem with Let’s Encrypt, but first I’ll explain you what I did, so:
-
I’ve created a virtual machine (running Linux 16.04) on VirtualBox
-
I’ve installed LAMP on it (following this guide: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04)
-
I’ve created 2 virtual hosts (following this guide: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04)
-
And finally I’ve installed let’s encrypt (following this guide: https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04 ) and I’ve run this command:
sudo certbot certonly --webroot -w /var/www/example.com/public_html/ -d example.com -d www.example.com
But it’s doesn’t works and show up this error:
Failed authorization procedure. www.example.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.example.com/.well-known/acme-challenge/VtOc6hZSerP5ODjuXlXvAY2iZm7XkRufPGRjbIzVcUE: "<!doctype html>
<html>
<head>
<title>Example Domain</title>
<meta charset="utf-8" />
<meta http-equiv="Content-type", example.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://example.com/.well-known/acme-challenge/ttEY4dkJD8Z5vC_iwFvQyfc_0x71D4ODLEilgabH1BA: "<!doctype html>
<html>
<head>
<title>Example Domain</title>
<meta charset="utf-8" />
<meta http-equiv="Content-type"
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: www.example.com
Type: unauthorized
Detail: Invalid response from
http://www.example.com/.well-known/acme-challenge/VtOc6hZSerP5ODjuXlXvAY2iZm7XkRufPGRjbIzVcUE:
"<!doctype html>
<html>
<head>
<title>Example Domain</title>
<meta charset="utf-8" />
<meta http-equiv="Content-type"
Domain: example.com
Type: unauthorized
Detail: Invalid response from
http://example.com/.well-known/acme-challenge/ttEY4dkJD8Z5vC_iwFvQyfc_0x71D4ODLEilgabH1BA:
"<!doctype html>
<html>
<head>
<title>Example Domain</title>
<meta charset="utf-8" />
<meta http-equiv="Content-type"
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A record(s) for that domain
contain(s) the right IP address.'
Now, I’ve searched this error and some of you suggest to try to create a simple page of test in ‘.well-known/acme-challenge/<my_test_page>’, but I’ve found that I don’t have the folder ‘acme-challenge’ (basically, I’ve just ‘/var/www/example.com/public_html/.well-known’).
How can i fix it?