You can setup SSL on your website using LetsEncrypt. I have encountered a few times when you want to add new domain to the LetsEncrypt, it throws the following error.
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. xxxxxxxxx (tls-sni-01): urn:acme:error:malformed :: The request message was malformed :: Server only speaks HTTP, not TLS
- The following errors were reported by the server:
Detail: Server only speaks HTTP, not TLS
I spent hours resolving this issue figuring out whether there is a problem on my VPS or web server configuration or VirtualHost config.
To resolve the issue, add the following lines to your Apache virtual host conf file. On Apache2, it is available under /etc/apache2/sites-available/000-default-le-ssl.conf
Then add ServerName to your 000-default.conf file.
Last thing, restart your apache2
sudo service apache2 restart
You should now be able to generate SSL LetsEncrypt certificate via
sudo letsencrypt -d domain-name
Happy Reading !!!