Score:-1

Windows Server 2022 2 IPs with IIS and Apache on port 80

cn flag

I have a Windows Server 2022 with 1 NIC that has 2 addresses, 192.168.1.8 and 192.168.1.9.

There's 2 sites on IIS that listen on 192.168.1.9:80, 192.168.1.9:443 and 192.168.1.9:856, these used to listen on *:80, etc..., changed on IIS Admin "sites > bindings"

Now I want to start apache and I've added Listen 192.168.1.8:80 and Listen 192.168.1.8:443 on the config files but I get the error:

(OS 10013)Intento de acceso a un socket no permitido por sus permisos de acceso.  : AH00072: make_sock: could not bind to address 192.168.1.8:80
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs

netstat -ano | findstr :80 returns this

TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4
TCP    192.168.1.9:57152      x.x.x.x:80          ESTABLISHED     7872
TCP    192.168.1.9:57153      x.x.x.x:80          ESTABLISHED     7872
TCP    192.168.1.9:57154      x.x.x.x:80          ESTABLISHED     7872
TCP    192.168.1.9:57155      x.x.x.x:80          ESTABLISHED     7872
TCP    [::]:80                [::]:0                 LISTENING       4
Lex Li avatar
vn flag
You should know this has been discussed for decades, and many solutions are there, like https://stackoverflow.com/questions/108387/apache-and-iis-side-by-side-both-listening-to-port-80-on-windows2003
Daviid avatar
cn flag
Once of those answers helped, I just had to add iplisten 192.168.1.9 and restart w3svc, also use `netsh` instead of `httpcfg`
Score:-1
br flag

From the output you posted, you can see that a process with PID 4 is listening on all interfaces on port 80 IPv4 and IPv6. Next step would be to open your task manager and check which process has PID 4. Then go ahead and change that configuration or shut down that service to free up the port mapping and apache should start without issue.

Daviid avatar
cn flag
It's just "SYSTEM"
br flag
@Daviid Interesting. I've not seen that but it is documented. Check here for example: https://serverfault.com/questions/65717/port-80-is-being-used-by-system-pid-4-what-is-that So you'll have to check what service it is in your particular case and shut that down.
Lex Li avatar
vn flag
SYSTEM (Process ID 4) is Windows kernel itself, so the port 80 is taken by http.sys (Windows HTTP API). It cannot be shut down, or you lost IIS.
br flag
@LexLi I don't think that's correct. Check the link in my previous comment. It mentions several services that could be causing this, IIS being one of them but the OP said he reconfigured his IIS to not run on port 80 any longer, so it must be another service also listening on port 80.
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.