HTTPS Content can't be loaded from an HTTP page when mod_spdy is installed


I just ran found out that for the last week or so all my websites were having trouble loading SSL resources when visitors navigated to the non-ssl page (basic HTTP). What made this so quirky is that Internet Explorer was not having any problems: Only Chrome and FireFox.

As it turns out, the problem turned out to be the mod_spdy module for my Apache web server.

Symptoms

When a visitor tries to access your http website they see a 'mangled' web page. You might be missing stylesheets and javascript resources which setup your page. This happens on an apache webserver with mod_spdy installed.

When you open the Chrome Debugger tools (or FireBug in FireFox), you see messages like this:

  • net::ERR_CONNECTION_CLOSED
  • net::ERR_CONNECTION_RESET
  • Aborted

 

You may also see problems like this you are trying to load the entire site over https (happened on one of my sites)

 

Solution / Work around

In my case I was just experimenting with SPDY to see if it could improve page load times. I am not fully committed to the protocol (yet), so I was able to turn off the mod_spdy extension like this:

  • Open your httpd.conf file (Centos 6 location: /etc/httpd/conf/httpd.conf )
  • Add this line somewhere in your file (I added it to a section near the end of my conf file):

    SpdyEnabled off

 

These directions were based off of the instructions listed on the mod_spdy site.

 

I might come back another day and try to figure out some way of getting around this. I'm not quite ready to default everything to https yet.