-1

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
Daviid
  • 99
  • 2
  • 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 – Lex Li Jul 06 '23 at 04:02
  • Once of those answers helped, I just had to add iplisten 192.168.1.9 and restart w3svc, also use `netsh` instead of `httpcfg` – Daviid Jul 06 '23 at 06:42

1 Answers1

-1

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.

MoWo
  • 443
  • 1
  • 10
  • It's just "SYSTEM" – Daviid Jul 05 '23 at 17:56
  • @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. – MoWo Jul 05 '23 at 19:42
  • 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. – Lex Li Jul 06 '23 at 03:58
  • @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. – MoWo Jul 06 '23 at 05:59