August 2017
Intermediate to advanced
278 pages
8h 53m
English
upstream stickyapp {
server 127.0.0.1:8080;
server 127.0.0.1:8081;
server 127.0.0.1:8082;
sticky cookie cookbook expires=1h;
}
server {
listen 80;
server_name session.nginxcookbook.com;
access_log /var/log/nginx/sessiontest-access.log combined;
location / {
proxy_pass http://stickyapp;
}
}
http http://session.nginxcookbook.com/
This output should show the server headers, which will contain a Set-Cookie header:
HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: ...Read now
Unlock full access