Type:malformed. Server only speaks HTTP, not TLS

Hi, Im trying to use certbot, but i got this message “Server only speaks HTTP, not TLS”

My domain is: raysu.ca

I ran this command: sudo ./certbot-auto --apache

It produced this output:
tls-sni-01 challenge for raysu.ca
tls-sni-01 challenge for www.raysu.ca
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. raysu.ca (tls-sni-01): urn:acme:error:malformed :: The request message was malformed :: Server only speaks HTTP, not TLS, www.raysu.ca (tls-sni-01): urn:acme:error:malformed :: The request message was malformed :: Server only speaks HTTP, not TLS

IMPORTANT NOTES:

  • The following errors were reported by the server:
    Domain: raysu.ca
    Type: malformed
    Detail: Server only speaks HTTP, not TLS
    Domain: www.raysu.ca
    Type: malformed
    Detail: Server only speaks HTTP, not TLS
    To fix these errors, please make sure that you did not provide any
    invalid information to the client, and try running Certbot again.

My web server is (include version): Apache/2.4.27 (Amazon)

The operating system my web server runs on is (include version): Amazon Linux AMI release 2017.03

My hosting provider, if applicable, is: EC2

I can login to a root shell on my machine (yes or no, or I don’t know): Yes

Here is what I did to my apache config file:
Listen 80
Listen 443

ServerName raysu.ca
ServerAlias www.raysu.ca
DocumentRoot /var/www/html
ErrorLog /var/www/html/logs/gs_error_log
CustomLog /var/www/html/logs/gs_access_log combined
DirectoryIndex index.html index.php
<Directory /var/www/html>
Options Indexes IncludesNOEXEC FollowSymLinks
Require all granted
AllowOverride All

Thanks in advance!

You should take out the Listen 443 directive. You don’t have an SSL configuration on that vhost, so it’s going to just serve regular HTTP over the HTTPS port. Certbot, in most cases, will reconfigure your Apache configs for you if they’re sane to start with, so you shouldn’t need the Listen 443 in there to use the Apache plugin.

thank you very much for your reply.
however I found that letsencrypt or certbot doesnt work well with Amazon Linux AMI.
I created another Instance with Ubuntu, Followed the instructions on certbot.eff.org, everything went smoothly, and no extra setup required.

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