How i have some trouble for redirect my http://sub.domaine.tld to https://sub.domaine.tld . I use nginx with proxypass on a Debian jessie (server) and java version "1.8.0_51, a domain name + certficat ssl signed by startssl :
/etc/nginx/sites-enabled/madsonic.conf
Code: Select all
# cat /etc/nginx/sites-enabled/madsonic.conf
upstream madsonic {
server 127.0.0.1:4040;
}
server {
listen 80;
server_name sub.domaine.tld;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name sub.domaine.tld;
client_max_body_size 200M;
ssl on;
ssl_certificate /etc/nginx/keys/domaine.ltd.crt-unified;
ssl_certificate_key /etc/nginx/keys/domaine.ltd.key;
include /etc/nginx/conf.d/ciphers.conf;
access_log /var/log/nginx/madsonic-access.log combined;
error_log /var/log/nginx/madsonic-error.log error;
# proxy to madsonic app
location / {
proxy_pass http://127.0.0.1:4040;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Server $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-Host $server_name;
}
}
/etc/default/madsonic
Code: Select all
# cat /etc/default/madsonic
MADSONIC_ARGS="--init-memory=512 --max-memory=1024 --default-upload-folder=/home/USER/media/incoming --default-podcast-folder=/home/USER/media/podcast --default-playlist-import-folder=/home/USER/m$
MADSONIC_USER=USER
But the problem is when would eg. edit settings or any other action who need to call a js script, my browser ( FF or Chromiun ) block the script because : Mixed Content
There is no rules to rewrite this in https
Is here a way to fix this ?Mixed Content: The page at 'https://sub.domaine.ltd/index.view' was loaded over HTTPS, but requested an insecure resource 'http://sub.domaine.ltd/musicFolderSettings.view'. This request has been blocked; the content must be served over HTTPS.
THX
3tc
Another french guy who need to learn english