Apache will not restart: make_sock could not bind to address [::]:443
Address already in use: make_sock: could not bind to address [::]:443Short answer
Apache could not open port 443 because something already holds it. Often that is Apache's own earlier Listen line: overlapping Listen directives are a fatal error. A restart can also fail when the Listen set changed, so do a full stop and start. Remove the duplicate Listen line first.
Fix it fast
1Find out which cause you have
List every Listen line in the configuration. Two lines that cover port 443 are the usual culprit.
grep -rn "^\s*Listen" /etc/apache2/2Match what you see, then jump to its fix
What does the error look like?
Address already in use: make_sock: could not bind to address [::]:443
Cause 1 of 2
Listen 443 appears more than once, or overlaps another Listen
1Check
Apache documents that overlapping Listen directives are a fatal error that stops start-up. A plain Listen 443 can occupy the IPv6 wildcard [::]:443, which also covers IPv4 on most systems.
grep -rn "Listen" /etc/apache2/ports.conf /etc/apache2/mods-enabled/2Fix
Keep one Listen line for the port, or use explicit addresses that do not overlap.
Listen 0.0.0.0:443
Listen 192.0.2.10:803Verify
Stop and start Apache, then read the status.
sudo systemctl stop apache2 && sudo systemctl start apache2Confirmed by httpd.apache.org
Cause 2 of 2
A restart after changing the Listen set
1Check
On a restart Apache keeps its original ports open so clients are not refused. If the new Listen set conflicts with the old one (for example 127.0.0.1:80 changed to 80), the configuration fails.
systemctl status apache2 --no-pager2Fix
Make a full stop followed by a start instead of a restart or reload.
sudo systemctl stop apache2
sudo systemctl start apache23Verify
Check the service is active.
systemctl is-active apache2Confirmed by httpd.apache.org
How do I stop it coming back?
- Keep Listen lines in one file (ports.conf) and nowhere else.
- After changing Listen, stop and start the service instead of restarting.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Related fixes
Servers
dnf cannot install MySQL on Amazon Linux 2023
dnf cannot find a mysql-server package on Amazon Linux 2023
Amazon Linux 2023 documents MariaDB, not MySQL, as its database server, with packages named mariadb105 and mariadb105-server.
3 causes, each with a fixServers
Ansible hangs, then times out waiting for the sudo prompt
a playbook using become seems to hang
Ansible ran sudo on the target and never saw the answer it expected.
3 causes, each with a fixServers
Apache on Ubuntu returns 404 Not Found for my site
The requested URL was not found on this server.
On Ubuntu a 404 from Apache usually means the request maps to a path that has no file.
3 causes, each with a fixServers
Apache returns 504 Gateway Timeout when PHP takes too long
Quick requests work, slow ones end in a 504 after a fixed wait
A 504 from Apache means the backend did not answer within the proxy timeout.
2 causes, each with a fixServers
Apache logs SIGWINCH and exits on its own
the httpd container stops although nothing crashed
SIGWINCH is Apache's graceful-stop signal.
2 causes, each with a fixServers
Apache warns that a ${VAR} config variable is not defined
${VAR} left unchanged in the configuration, with a warning in the error log
Apache expands ${VAR} from Define or from the shell environment that exists when the server starts.
3 causes, each with a fix