0

I'm having a problem with a nginx configuration which I use as a reverse proxy for different containerized applications. Basically Nginx is listening on port 80 and is redirecting every request to https. On different subdomains I'll then proxy pass to the port of the applications. For example my gitlab config:

server {

listen 443 ssl; # managed by Certbot
server_name gitlab.foo.de www.gitlab.foo.de;

location /{
    proxy_pass http://localhost:1080;
}

I'm redirecting to the gitlab http (not https) port. The systems nginx is taking care of SSL, I don't care if the traffic behind is encrypted or not.

This has been working for every app since yesterday.

I'd like to test https://github.com/bitnami/bitnami-docker-osclass for an honorary association. Same config as above but it is not working as intended. Ressources are downloaded via https while the main page is getting a redirect to http. Exmaple: https://osclass.foo.de --> redirect --> http://osclass.foo.de:1234/ (yes with the port in the domain which is very strange)

I don't get why? So I changed the config a little to:

server {
   listen 443 ssl; # managed by Certbot
   server_name osclass.foo.de www.osclass.foo.de;
   location /{
           proxy_pass http://localhost:1234;
           proxy_set_header Host $host;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           proxy_set_header X-Forwarded-Proto $scheme;
   }
}

Now the mainpage is loaded via https and I don't have the port in my domain anymore. But the whole page is broken because no ressources will be loaded due to

"mixed-content warning". SEC7111: [Mixed-Content] Origin "https://osclass.foo.de" [...] "http://osclass.foo.de/oc-includes/osclass/assets/js/fineuploader/fineuploader.css"

Do I have a conflict with the integrated apache in the docker image or what am I doing wrong?

Any hints are appretiated!

Kind regards from Berlin!

Stephan_Berlin
  • 113
  • 1
  • 8

1 Answers1

0

I found a solution to fix the mixed content problem. I just edited the following line in

/opt/bitnami/osclass/config.php

# define('WEB_PATH', 'http://osclass.foo.de/');
define('WEB_PATH', 'https://osclass.foo.de/'); # with https
Stephan_Berlin
  • 113
  • 1
  • 8