<p>I have different react apps and its backend-service deployed independently inside the Openshift. There is one app among them where users login and  navigate to othes apps using links provided in this app.</p>

<p>Presently, the link of each app points directly to the "Openshift Route" (similar to Kube Ingress) of the react app.</p>

<p>But, this for production regions we have to change the way it works. There is one public domain exposed, say, <code>apps.mydomain.com</code>. We should make the links of each on the apps in such a way that it is loaded by this path, <code>apps.mydomain.com/reactapp1</code> should load reactapp1 &amp; reactapp2 should be loaded in <code>apps.mydomain.com/reactapp2</code> and so on. </p>

<p>So there is one Ingress configured configured with paths</p>

<pre><code>rules:
- host: apps.mydomain.com
  http:
    paths:
      - backend:
          serviceName: home
          servicePort: 8080
        path: /
      - backend:
          serviceName: react-app-1
          servicePort: 8080
        path: /reactapp1
      - backend:
          serviceName: app-1-api
          servicePort: 8080
        path: /app1/api
      - backend:
          serviceName: react-app-2
          servicePort: 8080
        path: /reactapp2
      - backend:
          serviceName: app-2-api
          servicePort: 8080
        path: /app2/api
</code></pre>

<p>When I hit the url <code>https://apps.mydomain.com</code> it loads the <code>home</code> app, after login, on clicking the app links the apps doesn't load. Though I could see the browser title changed to the navigated app, I get this error <code>Uncaught SyntaxError: Unexpected token &lt;</code>.</p>

<p>After lots of searches I find the react app should have to be configured differently if it needs to be deployed not from root.</p>

<p>What am I missing? Where am I doing wrong? Ingress or react app build? Can I have different Ingress with same domain but with different paths for each react-app &amp; its backend api? </p>

vvra
<p>You could use openshift routes instead of ingress for that, you can check on the docs how to apply it <a href="https://docs.openshift.com/container-platform/3.11/architecture/networking/routes.html#path-based-routes" rel="nofollow noreferrer">https://docs.openshift.com/container-platform/3.11/architecture/networking/routes.html#path-based-routes</a></p>

<p>One detail to pay attention if that your app will receive the relative path, it is not strip out of your request, for instance:</p>

<p><code>apps.mydomain.com/app2/api   ---&gt;   app-2-api.svc:8080/app2/api</code></p>
