Replacing apache with nginx

mike mike503 at
Tue Sep 30 22:30:53 MSD 2008

On Tue, Sep 30, 2008 at 11:13 AM, Stephen Nelson-Smith
<sanelson at> wrote:

> 1) Needs to loadbalance over 3 servers

create an upstream:

> 2) Sessions need to be sticky - so the user goes to the same server
> all the time, after the session is started.

i'm always curious why people require sticky sessions. with
database-backed or some other central storage (hell even files over
NFS) i don't see the need for this at all. i've never used session
affinity and i've never had a single issue...

> 3) All http traffic needs to be coerced to https apart from

use a rewrite. that should work. or if it's a unique hostname you could do a

server {
   listen 80;
   rewrite ^(.*)$1 last;

depends on your setup though

More information about the nginx mailing list