<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Yes. &nbsp;That worked perfectly. &nbsp;I thought I had tried that already, but obviously not!<div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" color="#0011E0" face="Verdana"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Helvetica; "><span class="Apple-style-span" style="font-family: Verdana; "><font class="Apple-style-span" color="#000000">Thank you,</font></span><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Verdana" size="3" style="font: normal normal normal 12px/normal Verdana; "><font class="Apple-style-span" color="#000000">Casey Rayman<br></font></font></div></span></font></div></div></span> </div><br><div><div>On Jan 23, 2008, at 1:01 AM, Igor Sysoev wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On Tue, Jan 22, 2008 at 07:22:47PM -0600, Casey Rayman wrote:<br><br><blockquote type="cite">I've got a situation where the port being served to the outside world &nbsp;<br></blockquote><blockquote type="cite">and the proxy port may not be the same. &nbsp;e.g. firewall:9000 =&gt; nginx: <br></blockquote><blockquote type="cite">8080 =&gt; realserver:8000<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I'm currently using the following line which seems to take care of &nbsp;<br></blockquote><blockquote type="cite">everything but the port:<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>proxy_redirect &nbsp;<a href="http://realserver:8000">http://realserver:8000</a> <a href="https://$host:9000">https://$host:9000</a>;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I'd like something like this:<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>proxy_redirect &nbsp;<a href="http://realserver:8000">http://realserver:8000</a> <a href="https://$host:$port">https://$host:$port</a>;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Where $host:$port turns into firewall:9000 for the above example. &nbsp;&nbsp;<br></blockquote><blockquote type="cite">I've found variables for both the nginx port and the realserver port, &nbsp;<br></blockquote><blockquote type="cite">but can't find anything for the port the client sent the request to.<br></blockquote><br>There is no way to learn firewall's IP address and port on nginx side at all.<br><br>You may try<br><br> <span class="Apple-tab-span" style="white-space:pre">        </span>proxy_redirect &nbsp;<a href="http://realserver:8000">http://realserver:8000</a> <a href="https://$http_host">https://$http_host</a>;<br><br>this will work if client sends "Host: <a href="http://www.example.com:9000">www.example.com:9000</a>".<br><br><br>-- <br>Igor Sysoev<br><a href="http://sysoev.ru/en/">http://sysoev.ru/en/</a><br><br></blockquote></div><br></div></body></html>