Had a problem trying to restart apache today after editing the server settings. Initially I thought I’d broken the config but it turned out to be something else.
The error I was getting was:
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
Obviously another process was bound to 0.0.0.0:443 but what.
A quick /usr/sbin/lsof -i tcp:443 from the command line showed:
perl 30630 apache 4u IPv4 48534489 TCP *:https (LISTEN)
This meant a perl script launched from apache was still listening to 443 despite apache being restarted.
Killing the process fixed the problem.