http->https redirection on the same port

Michael Nachbaur mike at nachbaur.com
Tue Jun 17 19:55:35 MSD 2008


Hi, I'm currently migrating from Apache to lighttpd, but ran into a  
blocker that I can't seem to find my way around.  So I'm looking into  
using nginx instead, but I wanted to ask if my blocker exists here as  
well.

I have a web application running on a high port number.  It needs to  
be SSL encrypted, but I need to redirect the browser to https:// URLs  
automatically if they leave it as standard HTTP.  For instance:

http://my.app:8000 -> https://my.app:8000

I can't use different port numbers.  Apache supports this quite well,  
and while supposedly lighttpd supports this in its most recent  
version, I've been having some really weird problems I've been  
tracking down.

Does anyone know if this is possible with nginx?  I'll make the switch  
in a second if it is.  Thanks.





More information about the nginx mailing list