Reverse proxy didn't redirect http protocol

Dewangga dewanggaba at xtremenitro.org
Wed Sep 3 11:05:19 UTC 2014


-----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 http://ur1.ca/i45bu
ssl.conf http://ur1.ca/i45bx

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 :)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJUBvXuAAoJEEyntV5BtO+QjRMIAKa4YI/AEdOoJzRGIKUOun++
BbyuNKDH91vo3NJP8Q7CMkbFvPwLpbzy3HfZnUcXRObz9mS1D8KSpoIw2c67XhSh
HjaBfcnlSPVwLm5bSyr3xbPi8rJHgxj8fDgQUGmPc9kqIwjPgGIyaOqS5qQ5C7fS
uzsA8AL4/sm7yKFqULLHpMUqjz595GbMah9HQJCAZ8BQsYaTQ0CQB4khXdRSpQ/b
XABBTknkQjJ4MO0NhEwAEu6aFeKJq2u3HJoaB58Vx/7pUifhXJKPAQl8TgbLMuSR
qLC8gkFVJhK9cA4+pieMa3A6tUgt3WREZq3n9nP357DEVqw9PuoYZFbe09icYlk=
=UzEE
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x41B4EF90.asc
Type: application/pgp-keys
Size: 1743 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140903/779a1da0/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x41B4EF90.asc.sig
Type: application/pgp-signature
Size: 287 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140903/779a1da0/attachment-0003.bin>


More information about the nginx mailing list