简体   繁体   中英

nginx not load css js with reverse proxy

this is the error tips

Mixed Content: The page at ' https://lb.domain.com/ ' was loaded over HTTPS, but requested an insecure stylesheet ' http://lb.domain.com/media/css/843a626f40872c37930850e56f8a3215.css '. This request has been blocked; the content must be served over HTTPS. my nginx config file is:

server {
listen 443 ssl;
server_name lb.domain.com;

ssl_certificate /var/www/ssl/domain.com.crt;
ssl_certificate_key /var/www/ssl/domain.com.key;

ssl_session_cache    shared:SSL:1m;
ssl_session_timeout  5m;

ssl_ciphers  HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers  on;

location / {
include /etc/nginx/mime.types;
proxy_pass http://domain;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

and I use many ways could't solve this question.

can anyone helps?

thanks!

I was hoping I could send this as a comment, but I cannot figure out how. Did you refresh the Nginx service? It should be

Sudo nginx.service restart 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM