Windows – How to determine why port 443 is already in use

apache-http-servernetstatportsocketswindows 7

I'm running Apache 2.4.10 on a Windows 7 machine and am trying to add SSL connections. Port 80 connections work fine, and I'm trying to add port 443. When the httpd.conf gets Listen 443 added it fails to start up:

c:\Apache24\bin> httpd.exe -k start
(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted.  : AH00072: make_sock: could not bind to address [::]:443
(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted.  : AH00072: make_sock: could not bind to address 0.0.0.0:443
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs

A check using netstat at first revealed Chrome using port 443, so I quit Chrome and after the time out elapsed, the ports are now empty using netstat, but the server still fails to start when Listen 443 is present:

c:\Apache24\bin> netstat -ano | grep 443

How can I determine who is already on port 443 and blocking the Apache Server from using that port?

Best Answer

The issue appears to have been Apache conflicting with itself due to there being two Listen 443 directives, the one I added and one via include:

<IfModule ssl_module>
#Include conf/extra/httpd-ssl.conf
Include conf/extra/httpd-sni.conf
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

In the conf/extra/httpd-ssl.conf appears the conflicting line:

Listen 443 https

Dropping the Listen 443 I added resolved the issue.

Related Question