How to proxy to another port?

23 Views Asked by At

I've 2 applications one running on PORT 4041 and the other on PORT 4042. What I want to do is stay in 4041 and proxy to 4042.

In Apache, I already had done setup for both the ports and UI is deployed in them. I can also access the application using the separate ports.

The problem is occurring when I add a proxy config for accessing 4042 from 4041, the files are told not found by the network.

Below is the proxy config I used -

ProxyPass       /test       http://localhost:4042
ProxyPassReverse    /test       http://localhost:4042

I am trying to hit localhost:4041/test and this time the JS files in 4042 gets identified but can't get served.

Below is the network log that comes. The files are actually from port 4042. issue

What I understand is browser tries to find the files in the port 4041 folder but there it doesn't exist.

Is there any way I can access those files by staying in 4041 using a proxy?

0

There are 0 best solutions below