I know it's possible to serve more clients through a single port with different sockets, but can a single server process listen from different ports or do I need to make different processes each for every port?
In the case of the Apache web server HTTP and HTTPS ports, are there two different processes, one listening to HTTP 80 port and another listening to HTTPS 443 port?
Yes,
a single process can listen on multiple ports, just like 80 + 443 are done. Apache has different ways to the handle the requests, the so called MPM (MultiProcessingModules).
A documentation about the MPM in apache can be found here Apache 2.4 MPM
Usually you have single process and then multiple threads handling the requests as they are comming in.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With