Reverse proxy didn't redirect http protocol

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I have a page contains ‘http://’ assets, and I do redirect on my nginx
like this :

  • -------- BEGIN CONFIGURATION --------
    server {
    listen 80;
    server_name subdomain.domain.com;
    return 301 https://$http_host$request_uri$is_args$query_string;
    }

server {
listen 443 ssl spdy;
server_name subdomain.domain.com;

    location / {
            proxy_pass http://127.0.0.1:8080;
    }

    ssl on;
    ssl_certificate

/etc/nginx/certs/star-domain.com-bundle.crt;
ssl_certificate_key /etc/nginx/certs/star-domain.com.key;
ssl_verify_depth 2;

    location ~* ^.+\.(jpg|jpeg|gif|png|css|js|ico)$ {
            root /home/kincirplay/public_html;
            expires 1y;
            add_header Link "<$scheme://$http_host$request_uri>;

rel="prefetch"";
}
}

  • -------- END CONFIGURATION --------

Here is my proxy.conf and ssl.conf configuration (stored on conf.d
directory).

proxy.conf ur1.ca
ssl.conf ur1.ca

Can I do redirect my http assets (without change the code) using this
configuration? If can’t, is it possible? If possible, I need your help
to reconfigure the configuration.

Thanks in advance :slight_smile:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJUBvXuAAoJEEyntV5BtO+QjRMIAKa4YI/AEdOoJzRGIKUOun++
BbyuNKDH91vo3NJP8Q7CMkbFvPwLpbzy3HfZnUcXRObz9mS1D8KSpoIw2c67XhSh
HjaBfcnlSPVwLm5bSyr3xbPi8rJHgxj8fDgQUGmPc9kqIwjPgGIyaOqS5qQ5C7fS
uzsA8AL4/sm7yKFqULLHpMUqjz595GbMah9HQJCAZ8BQsYaTQ0CQB4khXdRSpQ/b
XABBTknkQjJ4MO0NhEwAEu6aFeKJq2u3HJoaB58Vx/7pUifhXJKPAQl8TgbLMuSR
qLC8gkFVJhK9cA4+pieMa3A6tUgt3WREZq3n9nP357DEVqw9PuoYZFbe09icYlk=
=UzEE
-----END PGP SIGNATURE-----