Welcome! Log In Create A New Profile

Advanced

http -> https redirection, with a twist?

Brad Knowles
February 28, 2012 09:08PM
Folks,

I've been trying to figure out how to set this up, I've gone through as much of the web site and wiki as I can, and I've searched on the net as much as I can. I'm still stumped.

We have several different servers that we want to redirect from port 80, and most of them will land on the same machine but on port 443. However, one of those needs to land on a different port -- 8443.

If this were a simple redirect without a twist, I'd probably go with something like the example shown at <http://serverfault.com/questions/192382/nginx-redirect-all-traffic/263091#263091>, although because I'm doing a one-to-one mapping of multiple FQDNs, and not just mapping a bunch of FQDNs to a single name, I'd be inclined to use an example more like this:

server {
server_name a.domain.com c.domain.com d.domain.com; # you can serve any number of redirects from here...
listen 80;
rewrite ^ https://$host$1$uri$is_arg$args permanent;
}


But with the single server definition listening to port 80 on all interfaces, I don't see how to make that one FQDN get redirected to port 8443 instead of port 443.

Am I missing something obvious here?

--
Brad Knowles <brad@shub-internet.org>
LinkedIn Profile: http://tinyurl.com/y8kpxu

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

http -> https redirection, with a twist?

Brad Knowles February 28, 2012 09:08PM

Re: http -> https redirection, with a twist?

António P. P. Almeida February 28, 2012 09:22PM

Re: http -> https redirection, with a twist?

Brad Knowles February 28, 2012 10:28PM

Re: http -> https redirection, with a twist?

António P. P. Almeida February 28, 2012 10:44PM

Re: http -> https redirection, with a twist?

Brad Knowles February 28, 2012 10:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 221
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready