Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Mixed content when i activate SSL #8826

Closed
kabengwa opened this issue Dec 11, 2017 · 6 comments
Closed

Mixed content when i activate SSL #8826

kabengwa opened this issue Dec 11, 2017 · 6 comments

Comments

@kabengwa
Copy link

kabengwa commented Dec 11, 2017

I have a reverse proxy for docker using jwilder/nginx-proxy and jrcs/letsencrypt-nginx-proxy-companion image for ssl with lets encrypt. how ever i am getting errors of mixed content in the contao site
(Mixed Content: The page at 'https://my-domain/contao' was loaded over HTTPS, but requested an insecure stylesheet 'http://my-domian/system/themes/flexible/fonts.css'. This request has been blocked; the content must be served over HTTPS.)
i cannot seem to find a solution to this.. any help is welcome. the back end is totally messed with no css because it is not loading since its trying to access the sheets with the wrong url of http:// . How can i solve this problem. Am very new to contao.

I am using contao 4.4.7, PHP 7.1.9

@fritzmg
Copy link
Contributor

fritzmg commented Dec 11, 2017

@kabengwa these kinds of questions should go to the community forum.

Anyway, are you using Contao 3 or 4?

@kabengwa
Copy link
Author

Sorry about that am new here, i have updated my issue and added the php and contao versions.
I am using contao 4.4.7, PHP 7.1.9

@fritzmg
Copy link
Contributor

fritzmg commented Dec 11, 2017

This is probably a duplicate of contao/core-bundle#895

You need to add your proxy's IP like this:

Request::setTrustedProxies(['…']);

within the web/app.php (and web/app_dev.php). I think somewhere before

// Handle the request
$request = Request::createFromGlobals();

@kabengwa
Copy link
Author

it doesnt seem to be working for me i guess the issue is with the ip address that i am using. with the setup that i have in docker i had used the ipaddress of the server that hosts the docker container because i have an nginx proxy infront of all the other containers .. is that the right one to use?

@kabengwa
Copy link
Author

i have got it... its the ipaddress of the container that holds the proxy.
which is gotten with docker inspect container_name
Thank you very much for your help.

@fritzmg
Copy link
Contributor

fritzmg commented Dec 11, 2017

No problem. Keep these comments in mind though: contao/core-bundle#895 (comment), contao/core-bundle#895 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants