title: Enabling SSL on Debian
body: <p>I want enable SLL on my Debian / Apache &amp; Letsencrypt (by Certbot).</p>
  
  <p>On ports.conf, both ports 80 &amp; 443 are listening:</p>
  
  <pre><code>Listen 80
  
  &lt;IfModule ssl_module&gt;
          Listen 443
  &lt;/IfModule&gt;
  
  &lt;IfModule mod_gnutls.c&gt;
          Listen 443
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>SSL is enabled:</p>
  
  <pre><code>&gt; a2enmod ssl
  Considering dependency setenvif for ssl:
  Module setenvif already enabled
  Considering dependency mime for ssl:
  Module mime already enabled
  Considering dependency socache_shmcb for ssl:
  Module socache_shmcb already enabled
  Module ssl already enabled
  </code></pre>
  
  <p>And my VirtualHosts are configured as follow:
  my-host.conf</p>
  
  <pre><code>    &lt;VirtualHost XX.XX.XX.XX:80&gt;
          ServerName www.myhost.com
          ServerAlias myhost.com
          Redirect / https://www.myhost.com
          DocumentRoot /home/myhost/www/public/
          CustomLog /var/log/apache2/myhost.com-access.log combined
          ErrorLog /var/log/apache2/lmyhost.com-error.log
          LogLevel warn
          &lt;Directory "/home/myhost/www/public/"&gt;
                  Require all granted
                  Options Indexes FollowSymLinks MultiViews
                  AllowOverride All
                  Order allow,deny
                  allow from all
          &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>myhost.com-le-ssl.conf:</p>
  
  <pre><code>&lt;IfModule mod_ssl.c&gt;
  &lt;VirtualHost XX.XX.XX.XX:443&gt;
          ServerName www.myhost.com
          ServerAlias myhost.com
  #       Redirect / https://www.myhost.com
          DocumentRoot /home/myhost/www/public/
          CustomLog /var/log/apache2/myhost.com-access.log combined
          ErrorLog /var/log/apache2/myhost.com-error.log
          LogLevel warn
          &lt;Directory "/home/myhost/www/public/"&gt;
                  Require all granted
                  Options Indexes FollowSymLinks MultiViews
                  AllowOverride All
                  Order allow,deny
                  allow from all
          &lt;/Directory&gt;
  SSLCertificateFile /etc/letsencrypt/live/www.myhost.com-0001/fullchain.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/www.myhost.com-0001/privkey.pem
  Include /etc/letsencrypt/options-ssl-apache.conf
  &lt;/VirtualHost&gt;
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>When I try to got to <a href="http:///www.myhost.com:443" rel="nofollow noreferrer">http:///www.myhost.com:443</a>, it works. But with <a href="https:///www.myhost.com" rel="nofollow noreferrer">https:///www.myhost.com</a> I have an error on Chrome:</p>
  
  <pre><code>ERR_SSL_PROTOCOL_ERROR
  </code></pre>
  
  <p>On my server, when I check with:</p>
  
  <pre><code>openssl s_client -crlf -debug -connect www.myhost.com:443 -status -servername www.myhost.com
  </code></pre>
  
  <p>I get this:</p>
  
  <pre><code>...
  124222757861008:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:782:
  ---
  no peer certificate available
  ---
  No client certificate CA names sent
  ---
  SSL handshake has read 7 bytes and written 323 bytes
  ---
  New, (NONE), Cipher is (NONE)
  Secure Renegotiation IS NOT supported
  Compression: NONE
  Expansion: NONE
  SSL-Session:
      Protocol  : TLSv1.2
      Cipher    : 0000
      Session-ID: 
      Session-ID-ctx: 
      Master-Key: 
      Key-Arg   : None
      PSK identity: None
      PSK identity hint: None
      SRP username: None
      Start Time: 1494247901
      Timeout   : 300 (sec)
      Verify return code: 0 (ok)
  </code></pre>
  
  <p>And finally, when in my Apache error log, I can see this:</p>
  
  <pre><code>[Sun May 07 20:06:53.419500 2017] [core:debug] [pid 18433] protocol.c(1275): [client xx.xx.xx.xx:52254] AH00566: request failed: malformed request line
  </code></pre>
  
  <p>In short, SSL is enabled, the port is correct and Apache can go through when I call it by its hosts:port.
  But, this port cannot calls my certificate and opens my host by https. It's like SSL is disabled...!</p>
  
  <p>Can you give me some ways to resolve this?
  Thanks to all!</p>