NodeBalancer + Apache + SSL + Wordpress -- site not rendering completely

I have followed the NodeBalancer SSL Guide here:

https://www.linode.com/docs/platform/no … figuration">https://www.linode.com/docs/platform/nodebalancer/nodebalancer-ssl-configuration

I have two Linodes behind a NodeBalancer. Over port 80, everything works fine. Over port 443, the SSL connection seems to work fine according to the Qualys SSL Site Test (https://www.ssllabs.com/ssltest/). However, the Wordpress site seems to be stripped of a lot of content. Looking at the page source, the style sheets and form actions, etc., show up as with HTTP absolute links in the source code, so all of that is missing, resulting in a non-functional Wordpress website.

The connection between the NodeBalancer and the Linode is over port 80, but on the client, connecting over HTTPS, I assume what is happening is that the browser is detecting some content as not secure and so not loading it.

I tried a pass-through on the NodeBalancer setup (using TCP as the protocol), but that seemed to not work at all.

Is anyone else using this combination successfully? Is there an Apache or Wordpress configuration change that can be made to allow the Wordpress site to function normally behind a NodeBalancer + SSL?

Thanks!

3 Replies

Sounds like your problem is with the wordpress template.

A badly made template (wordpress or other cms) would have protocol-specific URL's, which results in what you experience, a site working fine over http but appears broken over https, because mixed content is not allowed by browsers (and correctly so).

The solution, is to fix the template, so the produced URL's are protocol-agnostic.

What would be even better, is to completely stop serving unencrypted content and redirect users to https, especially now with free certificates, there is absolutely no reason why you should be serving unencrypted content.

Thank you – I'll dig through the template and see what work can be done there. It is happening on two different hosted Wordpress sites using two different templates, which is why I was concerned I was missing something with either the NodeBalancer or Apache, but it could certainly make sense that they both followed the same practices when they were written.

I appreciate the input!

Did you fix this? I wrote a blog post about this issue awhile back. I'm not sure how much has changed since.

The summary is, WordPress supports SSL but it can't detect that you're trying to use it when you're using a NodeBalancer. Thus, you need to manually tell it in the config.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct