Path Routing: Application Load Balancer for React Application

爷,独闯天下 提交于 2019-12-24 06:30:36

问题


I'm trying to create path routing in AWS application load balancer.

Example:

  1. apple.mango.com/vault goes to instance1 port 80 and nginx routes it to /var/html/reactApp1/build/
  2. apple.mango.com/flow goes to instance2 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!