/root/static/build files served over http instead of https



I installed a local centos7-vm with musicbrainz-server behind a nginx reverse proxy with fast-cgi.
I can’t figure out why the files generated by script/compile_resources.sh are served over http instead of https:

Blocked loading mixed active content “http://musicbrainz.mydomain.com/static/build/common-e9929f1997.css
Blocked loading mixed active content “http://musicbrainz.mydomain.com/static/build/jed-en-55a349d345.js
Blocked loading mixed active content “http://musicbrainz.mydomain.com/static/build/common-8afa17c1ee.js

I used the nginx configuration supplied in admin/nginx and added a redirect from *:80 -> *:443 and my ssl parameters.
My DBDefs.pm contains:

sub WEB_SERVER { “musicbrainz.mydomain.com:5000” }
sub WEB_SERVER_SSL { “musicbrainz.mydomain.com” }

Can anyone help me where to look or what to change so all static files are linked over https? Thanks alot.

Technical MB Server virtual machine discussions

I’m not 100% sure if it’s that, but try setting this in DBDefs.pm:

sub CANONICAL_SERVER { "https://musicbrainz.yourdomain.com" }


Thanks alot. I tried this but those 3 URLs were still included as http links instead of https.

In the end it was an easy solution:

fastcgi_param HTTPS $http_x_mb_https;

That variable wasn’t set (not sure where I expected it to be defined). So I manually added a

set $http_x_mb_https on;

and now it works. For some reason I expected that variable to be set somewhere - I shouldn’t have blindly copied everything.