I&#39;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">&lt;<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>&gt;</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>
&gt; So we&#39;re doing a credit card transaction and it comes back from paypal on<br>
&gt; the return trip with that error (on our end).  The reason is that the return<br>
&gt; URL is:<br>
&gt;<br>
&gt; <a href="http://www.domain.com:443/.." target="_blank">http://www.domain.com:443/..</a>..<br>
&gt;<br>
&gt; so its trying to access port 443 via http.<br>
&gt;<br>
&gt; I won&#39;t know till tomorrow, but I hope that we can adjust the return URL to<br>
&gt; correctly be &quot;<a href="https://www.domain.com." target="_blank">https://www.domain.com.</a>.. than it works as it should.<br>
&gt;<br>
&gt; My question is, should I put something in the Nginx configuration file that<br>
&gt; if someone tries to access &quot;http&quot; using port 443, redirect them to https?<br>
&gt; If so, how?  Is that the correct way of going about it outside of correcting<br>
&gt; the return URL (which of course would be the ideal way), but in general,<br>
&gt; 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>