I've come across this setting for nginx, but am not sure if this will solve it?<br><br><pre class="code"> proxy_set_header X_FORWARDED_PROTO https;<br></pre><br><br><div class="gmail_quote">2009/8/21 Igor Sysoev <span dir="ltr"><<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">On Thu, Aug 20, 2009 at 09:05:18PM -0400, Ilan Berkner wrote:<br>
<br>
> So we're doing a credit card transaction and it comes back from paypal on<br>
> the return trip with that error (on our end). The reason is that the return<br>
> URL is:<br>
><br>
> <a href="http://www.domain.com:443/.." target="_blank">http://www.domain.com:443/..</a>..<br>
><br>
> so its trying to access port 443 via http.<br>
><br>
> I won't know till tomorrow, but I hope that we can adjust the return URL to<br>
> correctly be "<a href="https://www.domain.com." target="_blank">https://www.domain.com.</a>.. than it works as it should.<br>
><br>
> My question is, should I put something in the Nginx configuration file that<br>
> if someone tries to access "http" using port 443, redirect them to https?<br>
> If so, how? Is that the correct way of going about it outside of correcting<br>
> the return URL (which of course would be the ideal way), but in general,<br>
> should requests coming to <a href="http://www.domain.com:443" target="_blank">http://www.domain.com:443</a> be forced to HTTPS?<br>
<br>
</div></div>nginx supports some internal error codes to handle error_page redirection:<br>
<br>
error_page 497 https://$host$request_uri;<br>
<br>
497 means that plain HTTP request was sent to HTTPS port.<br>
<font color="#888888"><br>
<br>
--<br>
Igor Sysoev<br>
<a href="http://sysoev.ru/en/" target="_blank">http://sysoev.ru/en/</a><br>
<br>
</font></blockquote></div><br>