Welcome! Log In Create A New Profile

Advanced

Reverse proxy didn't redirect http protocol

September 03, 2014 07:08AM
-----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-----
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Reverse proxy didn't redirect http protocol

dewanggaba September 03, 2014 07:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 98
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready