title: nginx proxy from https to http getting Blocked loading mixed active content error
body: <p>I am working with nginx (openresty) and am trying to setup a proxy from the public wan using https to an apache server on a private 10 network using http.  The application that I am trying to proxy is openscrum.  The page loads but some of the javascript (jquery and more) is trying to come over http and not https.  Using firebug I see these errors:</p>
  
  <pre><code>Blocked loading mixed active content "http://privateurl.com/js/jquery-ui-1.9.2.custom.min.js"
  </code></pre>
  
  <p>I cannot figure out what the solution is, here is what I am using for the nginx virtual host:</p>
  
  <pre><code>upstream SVRLINK {
    server    10.100.200.25;
  }
  server {
    listen 80;
    server_name   mgt.privateurl.com.com;
    rewrite       ^ https://$server_name$request_uri? permanent;
  }
  server {
    listen        443 ssl;
    server_name   mgt.privateurl.com.com;
  
    ssl                   on;
    ssl_certificate         /opt/services/configs/mgt/cert.pem;
    ssl_certificate_key     /opt/services/configs/mgt/key.pem;
    ssl_client_certificate  /opt/services/certs/public_certs/mychain.pem;
    ssl_verify_depth 5;
    # ssl_verify_client on;
  
    ssl_prefer_server_ciphers on;
    ssl_protocols         SSLv3 TLSv1;
    ssl_ciphers           ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM;
    client_max_body_size 20m;
    error_log   /etc/openresty/nginx/logs/error debug;
    access_log /etc/openresty/nginx/logs/access;
  
    location / {
      proxy_read_timeout 300;
      proxy_connect_timeout 300;
     # proxy_redirect     off;
  
      proxy_set_header   X-Forwarded-Proto $scheme;
      proxy_set_header   Host              $http_host;
      proxy_set_header   X-Real-IP         $remote_addr;
      proxy_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;
  
      proxy_pass http://SVRLINK;
      proxy_redirect http:// https://;
    }
  }
  </code></pre>
  
  <p>Any ideas on what I can do to get this working?  Thank you for taking the time.</p>
  
  <p>-stabiuti</p>