Mixed content causing ssl issue

HI,

I have my site set to use ssl. I've done this before on the same site, works fine. Then i deleted that plone isntance for new instance. Now I get the 'connection not secure' in the browser.

  1. In my hosting site I have the redirect and the .htaccess configured properly (per my host tech support)
  2. Looking at the page content info, it looks like the theme is sending out info on http vs https.

Is there a setting I need to change to fix this?

thanks for any help.

For mixed content you should usually see related messages inside the developer console of your browser.

There is usually nothing to fix on the Plone side unless you are using somewhere hard-coded http:// URLs e.g. referencing external resources like webfonts over http instead of https.

-aj

the theme is calling http. Is that the problem

Welcome to Plone — LWHSBoosters
  <div id="portal-header">
<a id="portal-logo" title="LWHSBoosters" href="http://lwhsboosters.org">
<img src="http://lwhsboosters.org/logo.png" alt="Plone site" title="Plone site" /></a>

I see http links in the text you provided. It looks that when you load that page into your https-browser window it wants to retrieve/pull-in pure http content (see the http urls/links in the text you pasted). In IExplorer you will get for example Mixed content warnings... change http links into https and the warning should disappear.

Hi Peter, yes, that is the problem, thanks.

Now, why is plone doing that? I know I had this issue before and figured it out, but can't remember.

I looked in Plone, and from responses here, I'm told there are no plone settings that would effect this. So, how to get the theme material to be https?

Any ideas.

This is controlled by your rewrite rule. Can you share your proxy configuration?

A very common reason for this is that you use an Add-on product that uses a java-script with an http:// url inside hard coded. That JavaScript loads in your browser IEXplorer and when executed IExplorer warns you when you have accessed your Plone via https.

A possible way to track the error is this:
When you visit your website via IExplorer and the Mixed Content error is shown then right-click on the page and choose: Inspect Element
Click on Console and reload the page. You will see which script is causing the error. Maybe that gives a hint for the package "in crime". Remove that package /product and visit the page again.

I had such error with the EEA Annotator (inline comments) 3.1

Hi @peter and @vangheem

I've had other issues with this site so Ive been away from this issue.

I did what peter suggested and I did see errors. One was for the slideshow in portlet, which I removed. Then I saw so many other issues I realized it has to be something else. note in addition to products causing issues, it references plone in general (e.g. Barcelona theme)

I'd appreciate any help. I use to have this site working fine as https, then had to delete site and started over, then these issues.

  1. here are the errors shown in the console:

DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337
File: lwhsboosters.org
HTML1300: Navigation occurred.
File: lwhsboosters.org
SEC7111: HTTPS security is compromised by http://lwhsboosters.org/++plone++production/++unique++2016-08-31T18:37:39.751521/default.css
File: lwhsboosters.org
SEC7111: HTTPS security is compromised by http://lwhsboosters.org/++plone++production/++unique++2016-08-31T18:37:39.751521/default.css
File: lwhsboosters.org
SEC7111: HTTPS security is compromised by http://lwhsboosters.org/++resource++collective.z3cform.datagridfield/datagridfield.css?version=2016-01-01%2000%3A00%3A00.000004
File: lwhsboosters.org
SEC7111: HTTPS security is compromised by http://lwhsboosters.org/++resource++collective.z3cform.datagridfield/datagridfield.css?version=2016-01-01%2000%3A00%3A00.000004
File: lwhsboosters.org
SEC7111: HTTPS security is compromised by http://lwhsboosters.org/++plone++slidertemplates/++unique++2015-10-29%2000%3A00%3A00.000003/slidertemplates-compiled.css
File: lwhsboosters.org
SEC7111: HTTPS security is compromised by http://lwhsboosters.org/++plone++slidertemplates/++unique++2015-10-29%2000%3A00%3A00.000003/slidertemplates-compiled.css
File: lwhsboosters.org
SEC7111: HTTPS security is compromised by http://lwhsboosters.org/++plone++dropdown/++unique++None/webcouturier.dropdownmenu-compiled.css
File: lwhsboosters.org
SEC7111: HTTPS security is compromised by http://lwhsboosters.org/++plone++dropdown/++unique++None/webcouturier.dropdownmenu-compiled.css
File: lwhsboosters.org
SEC7111: HTTPS security is compromised by http://lwhsboosters.org//++theme++barceloneta/less/barceloneta-compiled.css
File: lwhsboosters.org
SEC7111: HTTPS security is compromised by http://lwhsboosters.org//++theme++barceloneta/less/barceloneta-compiled.css
File: lwhsboosters.org
SEC7111: HTTPS security is compromised by http://lwhsboosters.org/++plone++production/++unique++2016-08-31T18:37:39.751521/default.js
File: lwhsboosters.org
SEC7111: HTTPS security is compromised by http://lwhsboosters.org/++resource++collective.z3cform.datagridfield/datagridfield.js?version=2016-01-01%2000%3A00%3A00.000004
File: lwhsboosters.org
SEC7111: HTTPS security is compromised by http://lwhsboosters.org/@@site-logo/lwhs%20school.jpg
File: lwhsboosters.org
SEC7111: HTTPS security is compromised by http://lwhsboosters.org/website-images/images-for-portlet/picture1.jpg/@@images/be770219-78b7-4372-8af9-d33eb33bc02f.jpeg
File: lwhsboosters.org
SEC7111: HTTPS security is compromised by http://lwhsboosters.org/website-images/images-for-portlet/picture2.jpg/@@images/8af2d2a1-f8bd-4261-9019-25b1928eeaa1.jpeg
File: lwhsboosters.org
SCRIPT5009: 'jQuery' is undefined
File: lwhsboosters.org, Line: 286, Column: 872

So what is your point?
The error message is clear because of using mixed content.
You need to check the CORS headers here in order to relax the browser checks.

-aj

@zopyx The issue to me is this is a basic install of Plone using default theme and I get problems. I assume I am doing something work in that I have the nearly same (plone 5 but not 5.505 ) on same host working (site is docentims.com). So I assume I am doing something wrong. I did more investigation:

  1. Based on host docs, I have this rewrite rule:

=======================
Options +FollowSymLinks

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-SSL} !on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Note: I also tried: ".... %{lwhsboosters.org}% ..." still didn't work

  1. the rewrite works in that: lwhsboosters.org (http) is sent to lwhsboosters.org (https)

  2. I see the problem is that the site is looking for content from the 'http' site
    but I don't know why.

What am I missing??

I assume that the browser is the performing the checks before fetching the actual data.
You can rewrite whatever you want when the browser blocks these requests in advance.

-aj

Likely, this is an information only.

This message (and its friends) tells you that a page obtained via "https" accesses resources via the "http" protocol and thereby potentially leaks sensitive information. I am not sure whether the browser treats this only as an information/a warning (and nevertheless fetches the page) or as an error (and does not use the resource).

Ideally, resources should be accessed via host relative urls (i.e. starting with "/") or via urls generated on access of the page (thereby using the same protocol as the page itself). Looks like this were not the case for you. Manual error, caching or a form of compilation (e.g. bundling) might be responsible for those kinds of errors. I would look at the html source of your page and try to get hints what component generated the url and then look at the corresponding source[s] to determine where to intervene.

@dieter
thanks for the help.

I understand what you are saying, especially in the second paragraph: "Ideally, resourses should be accessed.." Per your explanation, this would ensure that everything on the https page was referenced using https Makes sense.

Here is what confuses me: this is a simple, no changes Plone installation using the default theme. Also, I have another site (docentims.com) that has the same setup (using Plone 5.0.2 vs. Plone 5.0.5 on this problem site) and it works fine, has without any changes discussed here. How can this be? How can a OOTB Plone installation have these issues one installation and not on the other??

Some more details, the SSL cert is installed properly (the cert owner name and details is correct). Also, the site does not load properly because of this issue. Finally, if you take the option of ignoring this issue for a one time thing, the page sort of loads. However, trying to login gets a "There was an error loading modal." pop up error.

Any thoughts on this new information??

when I have had the modal error, changing the theme to another (or nothing) and then back works .
I dont think it has anything to do with the rest, but maybe worth a try.

Did you 'use' the site with http before ? (cached, maybe ?)

I dont know rewriting rules too well, but I have a working one with apache like this:
RewriteRule ^/(.*)$ http://127.0.0.1:8080/VirtualHostBase/https/www.mysite.com:443/plonesite/VirtualHostRoot/$1 [P,L]

I do not know.

As you are using different Plone versions for the two sites, a bug might have slipped in: I can imagine that the Plone tests are not complete for "HTTPS" access.

Caching or a form of compilation (e.g. bundling) might be the cause. In this case, the result would depend on the protocol used in the initial access/for the compilation - which might have been "https" in the working site and "http" in the other.

you're missing a second rewrite for the virtual host definition as stated in the documentation; something like this:

RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/https/%{HTTP_HOST}:443/Plone/VirtualHostRoot/$1 [P,L]

rewrite is a two-way process and your original rule is only rewriting after you visit the site: let's say you page contains an internal resource at http://lwhsboosters.org/++plone++production/++unique++2016-08-31T18:37:39.751521/default.css; then you need to guarantee that anybody asking for that resource will use HTTPS instead of HTTP; that's what you get with the rule you had.

with the rule I pasted above, Apache will rewrite all links that point to http://lwhsboosters.org to https://lwhsboosters.org before sending that page to the client, so the security warnings will never show up.

BTW, you should try nginx unless you have a good reason to use good-old Apache.

more information here: