0

I have a website running off of Apache. Standard HTTP works, but HTTPS does not. HTTPS causes my site to hang, and then eventually throw Error 524. I've looked all over for answers, but couldn't find anything that worked for me.

I saw someone had a similar issue to mine. So, I thought I might as well share my setup that may or may not be causing my issue.

Here's what my VirtualHosts looks like:

Listen 80
Listen 443
Listen 8080
Listen 9175

<VirtualHost *:80>
  DocumentRoot /var/www/html
  ServerName localhost
</VirtualHost>

<VirtualHost *:8001>
  DocumentRoot /var/www/html
  ServerName localhost
</VirtualHost>

<VirtualHost *:8080>
  DocumentRoot /var/www/html
  ServerName localhost
</VirtualHost>

<VirtualHost *:9177>
  DocumentRoot /var/www/html
  ServerName localhost
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot /var/www/html/
  ServerName smileytechdev.club
  ServerAlias www.smileytechdev.club
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot /var/www/smileytechguy.com/public_html/ims/
  ServerName ims.smileytechguy.com
</VirtualHost>

<VirtualHost *:9175>
  DocumentRoot /var/www/smileytechguy.com/public_html/ims/Server/
  ServerName ims.smileytechguy.com
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot /var/www/smileytechguy.com/public_html/
  ServerName smileytechguy.com
  ServerAlias www.smileytechguy.com
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot /var/www/haloassistant.com/public_html/
  ServerName haloassistant.com
  ServerAlias www.haloassistant.com
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot /var/www/scoutingforflags.org/public_html/
  ServerName scoutingforflags.org
  ServerAlias www.scoutingforflags.org
</VirtualHost>

<VirtualHost *:443>
  ServerName scoutingforflags.org
  ServerAlias www.scoutingforflags.org
  DocumentRoot /var/www/scoutingforflags.org/public_html/

  SSLEngine on
  SSLCertificateFile /var/www/scoutingforflags.org/publ.crt
  SSLCertificateKeyFile /var/www/scoutingforflags.org/priv.key
  SSLCertificateChainFile /var/www/scoutingforflags.org/root.crt
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot /var/www/tmocentric.com/public_html/
  ServerName tmocentric.com
  ServerAlias www.tmocentric.com
</VirtualHost>

<VirtualHost *:443>
  ServerName citrusui.me
  ServerAlias www.citrusui.me
  DocumentRoot /var/www/citrusui.me/public_html/

  SSLEngine on
  SSLCertificateFile /var/www/citrusui.me/publ.crt
  SSLCertificateKeyFile /var/www/citrusui.me/key.key
  SSLCertificateChainFile /var/www/citrusui.me/root.crt
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot /var/www/citrusui.me/public_html/
  ServerName citrusui.me
  ServerAlias www.citrusui.me
</VirtualHost>

Also note that I can successfully run telnet citrusui.me 443 (however, the connection closes after a few seconds). I've restarted Apache several times, but nothing seems to resolve my issue.

  • Can you access the site if you go direct, using a hosts file entry, instead of via CloudFlare? – Tim May 31 '16 at 02:58

1 Answers1

1

It seems like none of the traditional reasons why you're running into CloudFlare SSL issues don't apply in your case; so here are some debugging steps for you to follow. These will help you find the problem:

  1. Modify your hosts file on your local machine so that a domain routes straight to your origin web server instead of through CloudFlare.
  2. CloudFlare uses error 525 if an SSL handshake fails and 526 if there is an invalid certificate in strict mode, your error is simply a timeout. What this indicates is that the issue is likely down to some form of rewriting or a firewall. With your hosts file modified you should be able to see if the problem is with your origin web server.
  3. Ensure port 443 is open on your firewall.
  4. Whitelist CloudFlare's IP Addresses in your firewall to prevent any rate limiting.
  5. Be sure to check your Apache error log to see if there's any indication of errors there.
mjsa
  • 395
  • 2
  • 6
  • Upon further inspection, telnet definitely works. So it's not a firewall problem. Here is my hosts file: https://ghostbin.com/paste/sf9w8 and my error.log: https://ghostbin.com/paste/ph4p7 – Avery Magnotti May 31 '16 at 13:33