Skip to Content
Mastering NGINX - Second Edition
book

Mastering NGINX - Second Edition

by Dimitri Aivaliotis
July 2016
Beginner
320 pages
6h 32m
English
Packt Publishing
Content preview from Mastering NGINX - Second Edition

Legacy servers with cookies

You may find yourself in a situation where you will need to place multiple legacy applications behind one common endpoint. The legacy applications were written for a case where they were the only servers talking directly with the client. They set cookies from their own domain, and assumed that they would always be reachable via the / URI. In placing a new endpoint in front of these servers, these assumptions no longer hold true. The following configuration will rewrite the cookie domain and path to match that of the new application endpoint:

server { server_name app.example.com; location /legacy1 { proxy_cookie_domain legacy1.example.com app.example.com; proxy_cookie_path $uri /legacy1$uri; proxy_redirect default; proxy_pass ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Nginx Essentials

Nginx Essentials

Valery Kholodkov, Valery I Kholodkov
NGINX Cookbook

NGINX Cookbook

Tim Butler
NGINX Cookbook

NGINX Cookbook

Derek DeJonghe
NGINX Cookbook

NGINX Cookbook

Derek DeJonghe

Publisher Resources

ISBN: 9781782173311