You can call socket/listen/bind _before_ MHD_start_daemon() and pass the
ready-made fully-configured listen socket into MHD using
MHD_OPTION_LISTEN_SOCKET. The 'port' argument of MHD_start_daemon() will
be ignored in this case.
On 4/13/22 02:28, silvioprog wrote:
Hey guys.
Some days ago a user asked me the following question with the attached
picture:
/> Kevin said:
> Ok, I got some more explanation from my I.T. guy. It appears that
the servers listen on 0.0.0.0 which is "All IPs on All NICs on the
physical server it is running on".
> I want to have multiple different apps running on the same server,
but bound only to a specific IP. I have one server app with HOST set
to 1.0.125.11 port 443 and it BLOCKS the other server app from trying
to run on 1.0.125.13 port 443./
/> Here is a screen shot from cports...
> Having this capability will ELIMINATE the need to use an additional
layer, like Apache/Nginx or anything. I would be running pure MHD
stand alone .exes on a Windows server. Super super simple! Yipee!/
But, after looking at our MHD API, it seems we don't have any feature
"out of the box" like a flag to specify the host.
So, is there any trick to handle it in pure MHD API without
coding/handling sockets by hand?
Thanks in advance for any help!
image.png
--
Silvio Clécio