How to redirect all SSL traffic?

Alex Hunsaker badalex at
Mon Nov 9 03:23:02 MSK 2009

On Sun, Nov 8, 2009 at 15:25, Glen Lumanau <glen at> wrote:
> Ok ill try that.
> Why we can't use the same method for port 443?

I assumed and have the same ip address
and hence will go to the same nginx instance.  SSL only works with one
ip (unless you are using TLS with the server name stuff) so the server
{ listen 443; } gets traffic for both and  But it needs to redirect when it does not have the www
to and also serve the real page when
you go to Hence the difference.

Im sure there are other ways to do it, experiment a bit :)

More information about the nginx mailing list