A client wants to have two separate apps with the same domain name but different sub-paths to redirect. For example, app A would be http://myapp.mycompany.com/app-a
and app B would be [http://myapp.mycompany.com/app-](<http://myapp.mycompany.com/app-a>)b
.
After we configured the Nginx file to let the sub-path proxy to the right application, we met several more barriers:
XSESSIONID
, xaid
in it) into the same place. As a result, every time application A logged in, the application B will be kicked out. (I solved it by adding a specific path to the cookie.)__HOST-
prefix has the same path /
. (I solved it by disabling the __Host-
prefix, making it non-effective.)So I did an experiment to find out how to solve the problem. This article logs the whole detailed process of my experiment, from which you will learn how to implement the sub-paths for different applications.
sub-path-test.local
to 127.0.0.1
.dojo
errors.
Conclusion: Don’t need to do any change on the application in my experiment.After the process, you got the final result as the video below.
Each applications saves the cookie to the sub-path of its own, without effect on other applications.