Question

Coherence - Cookie Session Sharing between Applications Hosted on Different Servers

i have some web application on different servers i need them to have shared cookie session in browser.

i want to assign same domain to all of them with different urls. how can i implement this?

is it actually gonna work? i want to do it with virual host on a proxy server.

Was it helpful?

Solution

The first way that comes to mind is to create a symbolic link in your DocumentRoot to a mounted directory which exists on another server. If you do this cross-server and for each application, then no matter which server people arrive at (due to load balancing, etc.) each server has a 'complete' set as far as apache is concerned but actually you still have the different data in its respective place.

In your /html/ directory (example DocumentRoot) you would have:

application1/
application2 -> /mnt/application2/
application3 -> /mnt/application3/

Then you'd set up the mount - for example - so a df would have:

192.168.1.2:/var/www/html/application2   ...   /mnt/application2
192.168.1.3:/var/www/html/application3   ...   /mnt/application3

Doing it this way keeps the guy on the same site as far as apache and his browser, etc. are concerned and you are definitely using the same domain, but essentially just splitting the file system between servers based on url.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top