Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
Domain: alsharakagroup.com
Type: connection
Detail: Fetching http://alsharakagroup.com/.well-known/acme-challenge/67_Lwhq8ER4gKyH30TPq37AJK0ELrqxV8lCAiyPhS5E: Connection refused
Domain: www.alsharakagroup.com
Type: connection
Detail: Fetching http://www.alsharakagroup.com/.well-known/acme-challenge/73aURA5MAtrJPByu6W3chLgMjF5qY7k4_1iV1DmIkLM: Connection refused
Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded from the internet.
I mean for you to focus on the HTTP and get that working before looking further into the HTTPS side.
That said, can you also show the output of: certbot certificates
Domain: alsharakagroup.com
Type: unauthorized
Detail: Invalid response from http://alsharakagroup.com/.well-known/acme-challenge/elmC2NPAes9BK9agvsu5Cdr2nYGIbJj9JiYSbfTaIFQ [147.182.136.95]: "<html>\r\n<head><title>404 Not Found</title></head>\r\n<body>\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx</center>\r\n"
Domain: www.alsharakagroup.com
Type: unauthorized
Detail: Invalid response from http://www.alsharakagroup.com/.well-known/acme-challenge/JTyVutcpWOJBC_sjnyiENZhLIKS4Z-XiPlV3IFEgFHs [147.182.136.95]: "<html>\r\n<head><title>404 Not Found</title></head>\r\n<body>\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx</center>\r\n"
@rg305 Good point. I cannot start nginx if a named SSL certificate does not exist (it fails with an error status=1).
@Elabbasy00 Until you have certs, just comment out the 2 lines for ssl_certificate and _key, use sudo nginx -t to test the configuration, and restart nginx. Of course, that wont allow https until you get valid certs, uncomment the lines, and reload nginx.
Seriously, you are making progress. A half-hour ago I got 'connection refused' when using http to connect to your server. But, now it works such that I get a 301 redirect which matches your nginx config you posted.
https still fails but it looks like you should be able to issue certs now with http working. My https try:
Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
Domain: alsharakagroup.com
Type: unauthorized
Detail: Invalid response from http://alsharakagroup.com/.well-known/acme-challenge/NhPoNfHpjyrnZzA3xDOvYawnVMhlRgguVLV40FAsySM [147.182.136.95]: "<html>\r\n<head><title>404 Not Found</title></head>\r\n<body>\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx</center>\r\n"
Domain: www.alsharakagroup.com
Type: unauthorized
Detail: Invalid response from http://www.alsharakagroup.com/.well-known/acme-challenge/WT-3fVSWV4mnaDcQniCoblw8OdmFFk5G3yBtG5MeB6c [147.182.136.95]: "<html>\r\n<head><title>404 Not Found</title></head>\r\n<body>\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx</center>\r\n"
Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded 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.
ERROR: 1
I wonder...
If it is so clear to you, please tell me where the problem is (and maybe also how to fix it).
Or maybe fixing it is our part in this process.
My methodology is:
Find where the problem is
Find why the problem occurs
Fix the problem
We I only just now know the very first part.
Anything anyone can do to speed that up - please feel free to assist the process.