http->https redirection on the same port

Michael Nachbaur mike at nachbaur.com
Thu Jun 19 00:53:28 MSD 2008


On 18-Jun-08, at 1:21 PM, Igor Sysoev wrote:

> On Wed, Jun 18, 2008 at 01:05:26PM -0700, Michael Nachbaur wrote:
>
>> On 17-Jun-08, at 9:11 AM, Igor Sysoev wrote:
>>
>>> BTW, how had you implemented this in Apache ?
>>
>> We built this with an ugly CGI script that handled the  
>> redirection.  I
>> can't remember off the top of my head how this is built, because it
>> was written before my time.  Lighttpd supports a "$HOST[scheme]"
>> variable that can be used to handle request configuration, but it
>> seems to be buggy.
>
> I had asked because last time I checked this, Apache simply returned  
> 400
> for a plain HTTP request sent to a HTTPS server. I'm curious how do
> you pass the request to CGI script ?

Well, we listed the error handler for 400 errors as being /cgi-bin/ 
400.cgi which outputted a redirect page containing meta refresh to the  
new URL.





More information about the nginx mailing list