V
V
Vann Damm2020-05-12 14:33:30
JavaScript
Vann Damm, 2020-05-12 14:33:30

The project is launched on two ports, for what?

On my project, I run the server on a specific port, and in the browser, respectively, I prescribe localhost:port.
And everything works. Other people, on their own projects, make the server run on one port and the client part on the other, and with the help of a proxy, they make it possible to make requests to the server from the client part.
Question: 1. Is it possible to create two servers? or how does it work on two ports?
2. Why create two listeners, if you can configure everything to listen from one port?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Karpion, 2020-05-12
@effect_tw

I did not understand what the "client part" is.
1) One server can listen to two ports - for example, Apache.
2) It makes sense to spread different functions to different ports. For example, users go to one port, and the admin - to another. It becomes more difficult for hackers - the second port must be found, the most stupid / inexperienced "mom hackers" (youngsters) break off on this - the most annoying part of hackers. In addition, the admin port can be covered in the firewall - so that there is access from a specific list of IP addresses. Or you can cover it with port-knocking technology.
This is if I understand the question correctly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question