问题
I'm trying to create path routing in AWS application load balancer.
Example:
apple.mango.com/vault
goes toinstance1
port 80 and nginx routes it to/var/html/reactApp1/build/
apple.mango.com/flow
goes toinstance2
port 80 and nginx routes it to/var/html/reactApp2/build/
My configuration look something like this:
Also, for both /var/html/reactApp1/build/
and /var/html/reactApp2/build/
, I have them hosted normally say mango.com
and apple.com
and they work just fine.
Problem Statement:
When the application is visited via path routing like apple.mango.com/vault
or apple.mango.com/flow
it reaches the correct machines/root but fails to load the sites as expected.
Upon inspecting the blank page, it does not load the node-modules:
Where am I going wrong?
来源:https://stackoverflow.com/questions/58640453/path-routing-application-load-balancer-for-react-application