title: Apache: cURL: ssl3_get_record:wrong version number for apache2 ssl
body: <p>I have a server with 2 Magento sites running simultaneously. Site 1 works fine under SSL, while site 2 returns an error whenever I visit it.</p>
  
  <p>I tried to test the website using cURL:</p>
  
  <pre><code>curl -v https://example2-domain.com/
  </code></pre>
  
  <p>The cURL throws this error:</p>
  
  <pre><code>*   Trying 97.74.223.135...
  * TCP_NODELAY set
  * Connected to example2-domain.com (97.74.233.135) port 443 (#0)
  * ALPN, offering h2
  * ALPN, offering http/1.1
  * successfully set certificate verify locations:
  *   CAfile: /etc/ssl/certs/ca-certificates.crt
    CApath: /etc/ssl/certs
  * (304) (OUT), TLS handshake, Client hello (1):
  * error:1408F10B:SSL routines:ssl3_get_record:wrong version number
  * stopped the pause stream!
  * Closing connection 0
  curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number
  </code></pre>
  
  <p>Here's the Apache VirtualHost blocks for reference:</p>
  
  <pre><code>&lt;VirtualHost 97.74.233.135:8080&gt;
      ServerName www.example-domain.com
      ServerAlias example-domain.com
      DocumentRoot /home/example/public_html
      DirectoryIndex index.php
      ServerAdmin webmaster@example-domain.com
      UseCanonicalName Off
      ScriptAlias /cgi-bin/ /home/example/public_html/cgi-bin/
      &lt;Directory /home/example/public_html&gt;
          Order allow,deny
          Allow from all
      &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost 97.74.233.135:8080&gt;
      ServerName example-domain2.com
      DocumentRoot /home/example2/public_html
      DirectoryIndex index.php
      ServerAdmin webmaster@example-domain2.com
      UseCanonicalName Off
      ScriptAlias /cgi-bin/ /home/example2/public_html/cgi-bin/
      &lt;Directory /home/example2/public_html&gt;
          Order allow,deny
          Allow from all
      &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost 97.74.233.135:443&gt;
      ServerAdmin webmaster@example-domain.com
      ServerName www.example-domain.com
      LogLevel warn
      ErrorLog /var/log/apache2/example-domain.com-ssl-error.log
      CustomLog /var/log/apache2/example-domain.com-ssl-access.log combined
      ProxyPreserveHost On
      ProxyPass / http://127.0.0.1:6081/
      ProxyPassReverse / http://127.0.0.1:6081/
      RequestHeader set X-Forwarded-Port "443"
      RequestHeader set X-Forwarded-Proto "https"
      SSLEngine On
      SSLCertificateFile /ssl/example-domain.crt
      SSLCertificateKeyFile /ssl/example-domain-key.txt
      SSLCertificateChainFile /ssl/example-domain.ca-bundle
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost 97.74.233.135:443&gt;
      ServerAdmin webmaster@example-domain2.com
      ServerName example-domain2.com
      LogLevel warn
      ErrorLog /var/log/apache2/example-domain2.com-ssl-error.log
      CustomLog /var/log/apache2/example-domain2.com-ssl-access.log combined
      ProxyPreserveHost On
      ProxyPass / http://127.0.0.1:6081/
      ProxyPassReverse / http://127.0.0.1:6081/
      RequestHeader set X-Forwarded-Port "443"
      RequestHeader set X-Forwarded-Proto "https"
      SSLEngine On
      SSLCertificateFile /ssl/example-domain2.com.crt
      SSLCertificateKeyFile /ssl/example-domain2-key.txt
      SSLCertificateChainFile /ssl/example-domain2.ca-bundle
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>In case you're wondering what sits on port 6081, Varnish is configured to sit on that port.</p>
  
  <p>Can someone please care to enlighten me as to why this happens? Thanks!</p>