0

I have a react app that listening to localhost:3939

Then, I configured a Virtualhost like this to proxy pass the port 3939 on https://test.example.com:

<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName test.example.com

[SSL]

ProxyPass / http://localhost:3939/
ProxyPassReverse / http://localhost:3939/
ProxyPreserveHost On

</VirtualHost>
</IfModule>

I have another app listening the port 3940 on https://test2.example.com

The problem is that apps are available on:

So, I want that the port 3939 to be only listened for test.example.com and 3940 for test2.example.com

  • If your apps are listening on `localhost` ports 3940 and 3939, you should not be able to access them from anywhere other than through the proxy (which is only listening on port 443). – larsks Jun 07 '23 at 12:34

1 Answers1

0

@larsks you're right:

My react apps are listening on 0.0.0.0 by default instead of localhost. I just force listening on localhost only.