Score:0

Apache - ProxyPass serve port only for one server name

ls flag

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

pt flag
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).
Score:0
ls flag

@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.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.