I’m developing 2 sites as frontend (http://localhost:2000) and backend site (http://localhost:5000). I try to send cookie from frontend to backend but not success and I know to do this I must set 2 sites is the same domain.
The first thing I want to say is I dont know “the same domain is” and here is what I try. I make a config file like this:
As for your cookie problem, you should indicate to the browser that the cookie is for ecom-dev.local, rather than be.ecom-dev.local or fe.ecom-dev.local. How you do this depends on the technology you’re using, but generally there is a parameter called domain when you set a cookie, that should be ecom-dev.local.
This is unconvinient, I still use port in new virtual host. I mean I want to setup fe.ecom-dev.local for locahost:2000 and be.ecom-dev.local for localhost:5000, not fe.ecom-dev.local:2000.
Here is new config I found but it does not work:
<VirtualHost *:80>
ProxyPreserveHost On
ProxyRequests Off
ServerName www.fe.ecom-dev.local
ServerAlias fe.ecom-dev.local
ProxyPass / http://localhost:2000/
ProxyPassReverse / http://localhost:2000/
</VirtualHost>