I have an httpd upstream server that listen on both http and https at
different port and want to send all http=>http_upstream and https =>
https_upstream

The following does the trick

#####################
if ( $scheme = https ) {
set $port 4430;
}
if ( $scheme = http ) {
        set $port 9999;
}

location / {

    proxy_pass   $scheme://127.0.0.1:$port;
}
#####################

Just wanted to know if this is very inefficient (if-being evil) than
hard-coding the port and having two different server{} blocks for http and
https .

Thanks in advance.



-- 
*Anoop P Alias*
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to