Replacing apache with nginx
Gena Makhomed
gmm at csdoc.com
Tue Sep 30 23:20:22 MSD 2008
On Tuesday, September 30, 2008 at 21:30:53, mike wrote:
>> Sessions need to be sticky - so the user goes to the same server
>> all the time, after the session is started.
yes, it is possible: use ip_hash directive of ngx_http_upstream module.
m> i'm always curious why people require sticky sessions.
m> with database-backed or some other central storage
m> (hell even files over NFS) i don't see the need for this at all.
m> i've never used session affinity and i've never had a single issue...
there is one good reason: shared session storage is single point of failure.
>> 3) All http traffic needs to be coerced to https apart from www.mysite.com/xml
m> use a rewrite. that should work. or if it's a unique hostname you could do a
m> server {
m> listen 80;
m> server_name foo.com;
m> rewrite ^(.*) https://foo.com/$1 last;
m> }
unique location quite enough:
server {
listen 80;
server_name example.com;
location /xml {
rewrite ^ https://example.com$request_uri permanent;
}
}
--
Best regards,
Gena
More information about the nginx
mailing list