Apache’s make_sock: could not bind to address error means it could not claim TCP port 80. Find the process or Apache directive that already owns the address, decide which service should be the public listener, correct the binding or port, then perform a configuration test and a complete stop/start. Do not kill a PID until you know what service it represents.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
What “address already in use” means
Apache opens a listening socket for every Listen directive in its loaded configuration. Startup fails when the operating system will not grant one of those sockets. The most common reason is another process already listening on port 80, but Apache can produce the same message when its own configuration asks for an overlapping socket.
As an Amazon Associate I earn from qualifying purchases.
The exact address in the error identifies the scope of the attempted bind:
0.0.0.0:80means all IPv4 interfaces.[::]:80means the IPv6 wildcard address.192.0.2.10:80(or another specific address) means Apache is trying to use only that interface address.
That distinction determines the next check. A different process shown in the socket listing is an operating-system collision. If Apache already owns the port, or no listener appears, inspect every loaded Listen directive and the host’s interface addresses.
#1 Best Overall
Start with a five-minute triage
- Capture the complete startup message. Record the bind address, port, and whether the message names a particular Apache child or parent process. Also note whether the failure occurs during boot, a service restart, or a manual launch.
- List listeners on port 80. Use the command for your operating system below. Run it with administrator privileges so the process name and PID are visible.
- Map the PID to a service. Do not assume that a web server owns the socket. It could be a reverse proxy, container-published service, development server, desktop application, or another Apache instance.
- Choose ownership deliberately. Either stop or move the confirmed conflicting service, keep it as the public listener and move Apache, or correct Apache’s own bindings.
- Validate before restarting. Run Apache’s configuration test, then use a full stop followed by a start when the
Listenlayout changed.
Find which process owns port 80
Linux and other Unix-like systems
The modern socket tool is:
sudo ss -ltnp '( sport = :80 )'
The output shows listening TCP sockets and, when permitted, the owning process and PID. An alternative that prints numeric addresses and ports is:
sudo lsof -nP -iTCP:80 -sTCP:LISTEN
On systems that still provide it, use:
sudo netstat -plant
Then look specifically for a local address ending in :80 and record the program name and PID. If the command returns no listener, that does not clear Apache’s configuration: a duplicate Listen line can fail during socket creation even when no unrelated service is present.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Windows
Open an elevated Command Prompt or PowerShell session and run:
netstat -ano
Find rows whose local address ends in :80 and whose state is LISTENING. The final column is the PID. Map it to a process with Task Manager or a command such as:
tasklist /FI "PID eq 1234"
Replace 1234 with the PID you found. If the PID belongs to a Windows service, identify the service before stopping it; a web server or proxy may be serving traffic that other applications depend on.
Decide what should own port 80
Port 80 is normally the public HTTP entry point, so changing its owner can affect virtual hosts, reverse-proxy routes, containers, firewall rules, monitoring, and bookmarks. The correct remedy is an architectural decision, not simply the fastest way to make Apache start.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsRank #2
The listener is an intentional front-end
If the PID belongs to a reverse proxy or another web server that is supposed to receive public HTTP traffic, leave that service on port 80. Configure Apache on an intentional alternate port and route requests to it from the front-end. Update the relevant virtual-host or proxy configuration and any firewall rules that refer to the old backend port. This preserves the existing public endpoint while avoiding two services competing for one socket.
The listener is an unwanted or obsolete service
Stop it through its normal service manager, disable an unwanted automatic start, or change its configured port. Only terminate a process directly after confirming its identity and role. Killing a PID without checking can interrupt a production site, a container workload, or a system component that happens to expose HTTP.
The PID is another Apache instance
Check whether a second parent process was started outside the service manager, whether a test installation uses the same configuration, or whether a stale service definition launches Apache twice. Stop the extra instance using its own control path. Starting one managed instance with one known configuration is safer than repeatedly killing whichever PID appears first.
Audit every loaded Listen directive
Apache reads a main configuration file plus included files. Searching only the file you normally edit can miss a duplicate in a distribution snippet, enabled site, module configuration, or alternate installation.
On Unix-like systems, search the configuration tree for all active directives:
grep -RIn --include='*.conf' '^[[:space:]]*Listen[[:space:]]' /etc/apache2 /etc/httpd 2>/dev/null
Use the actual configuration directory for your installation. On Windows, search the Apache conf directory with your editor or PowerShell. Review included files as well as the main file.
Recognize overlapping bindings
These examples can conflict:
Listen 80
Listen 192.0.2.10:80
The wildcard request covers the specific IPv4 address, so Apache is asked to claim the same endpoint twice. Apache’s HTTP Server 2.4 binding documentation states: “Overlapping Listen directives will result in a fatal error which will prevent the server from starting up.” Remove the duplicate or redesign the addresses so each socket is genuinely distinct.
Other combinations can overlap too, including repeated copies of the same line and wildcard IPv6/IPv4 arrangements whose behavior depends on the operating system’s dual-stack settings. Keep only the bindings required by the deployment and document why each remaining line exists.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchSeparate socket bindings from virtual hosts
A VirtualHost entry does not create an independent operating-system socket. Virtual hosts share the addresses and ports Apache has successfully opened through Listen. Adding more virtual hosts will not solve a failed port bind; first make the socket layout valid, then verify the host-name routing.
Verify that a specific IP is actually assigned
A directive such as Listen 192.0.2.10:80 fails if that address is not currently configured on an active interface. This commonly appears after a DHCP change, cloud failover, network reconfiguration, or moving a configuration file between hosts.
Compare the address in the error with the host’s current interface list. On Unix-like systems, inspect it with your platform’s address command, such as ip address; on Windows, inspect the active adapters with ipconfig. The address must be present on an enabled interface before Apache can bind it.
If the host’s address can change, a port-only or wildcard form may be more resilient:
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #4
Listen 80
That choice exposes Apache on every matching interface, so apply it only when the network exposure and firewall policy are intentional. A specific address is narrower, but it requires dependable address assignment and a corresponding failover plan.
Check privilege and mandatory access controls
Unix privilege for port 80
TCP ports below 1024 are privileged on Unix-like systems. A non-root launch can therefore fail before Apache serves a request. Start Apache through the platform’s service mechanism or with the required privilege, rather than granting broad permissions to an ad hoc process. If you deliberately run Apache without root, use an approved capability and service design for that operating system, and verify that the resulting worker-process permissions remain appropriate.
SELinux
SELinux can deny a bind even when no other process owns the port. To see which ports the HTTP policy currently permits, run:
semanage port -l | grep http
If Apache is intentionally configured for a nonstandard port, add that port to the appropriate http_port_t policy only after confirming the design. Also inspect the audit log for a denial; changing policy blindly can hide a configuration error or expose a service more broadly than intended.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →AppArmor
When AppArmor is enabled, check the profile status and system logs for a denied bind. A profile change should match the Apache installation and the intended port, and it should be followed by a configuration test and controlled restart. Do not disable the entire security framework as a first diagnostic step.
Apply the correction without leaving stale sockets
Test the Apache configuration
Use the executable supplied by your installation:
apachectl configtest
apache2ctl configtest
httpd -t
Run the command that exists on your system; these are alternatives, not three required commands. A successful syntax test confirms that Apache can parse the configuration, but it does not prove that every address is available or that a security policy will permit the bind.
Best Value
Stop completely, then start
When you change Listen directives, stop Apache fully and start it again through the normal service manager. Apache documentation notes that a restart can retain old sockets; a conflicting binding change may therefore require a complete stop followed by start. Confirm that the old parent process has exited before launching the replacement.
A safe sequence is:
- Edit the binding or remove the confirmed conflicting service.
- Run the configuration test and correct every reported error.
- Stop Apache and verify that its parent process is gone and the intended port is no longer held by the old instance.
- Start Apache once.
- Re-run the socket listing and verify that the expected address, port, and PID are now present.
A service manager that immediately restarts a failed unit can make this look like a race. Temporarily prevent repeated automatic restarts while diagnosing, then restore the desired policy after the configuration is stable.
Choose among the main remedies
| Remedy | Use it when | Benefits | Trade-offs to check |
|---|---|---|---|
| Stop or reconfigure the other listener | The process is obsolete, accidental, or should not serve public HTTP | Apache can keep port 80 and existing HTTP URLs | Stopping it may break a proxy, container, development workflow, or another site |
| Keep the existing front-end and move Apache | The current listener is the intended public web server | Preserves the established public endpoint and lets the front-end route to Apache | Requires coordinated virtual-host, reverse-proxy, firewall, and backend-port changes |
Remove overlapping Listen lines |
No unrelated process owns port 80 and Apache’s own directives overlap | Fixes a fatal configuration collision without changing service ownership | All included files must be audited so the duplicate does not return |
| Correct or narrow the IP binding | The configured address is absent or exposure must be limited | Aligns Apache with the host’s real interfaces and security boundary | A wildcard bind reaches more interfaces; a specific bind depends on stable address assignment |
| Permit the intended port in security policy | SELinux or AppArmor blocks an otherwise valid design | Retains mandatory access control while allowing the chosen binding | Policy changes must be specific and reviewed, especially for nonstandard ports |
Make the choice using five questions: Which service should be the public listener? Which interfaces should be exposed? Do virtual hosts, reverse proxies, containers, and firewalls expect port 80? Does the security policy allow the planned bind with least privilege? Can the deployment tolerate a full stop/start?
Scenario playbooks
Nginx, IIS, or another web server is listening
Confirm the service name and its intended role before changing anything. If it is the front-end, leave it on port 80 and move Apache to a backend port that is permitted by the host’s security policy. If Apache is meant to replace it, schedule the cutover, stop the old service cleanly, validate Apache, and then start Apache. Check the listener again after the change rather than assuming the service manager applied it.
A container or development server owns the port
Find the host process or container publication responsible for port 80. Stop or republish that workload only if it is not the service that users should reach. If it is temporary development traffic, record the port mapping so the conflict does not reappear after a reboot or an automatic container restart.
No unrelated process appears
Audit all included Apache configuration files for repeated or overlapping Listen directives. Then verify the specific IP, privilege, SELinux/AppArmor decisions, and Apache process state. An empty socket listing does not rule out a stale parent process or a start/stop race, especially when a service manager is launching Apache repeatedly.
When the error persists after the apparent fix
- Check the error log or console output. Apache records fatal startup details there. The next message may identify an address, policy denial, or configuration file that the first line did not make clear.
- Look for a second parent process. Compare the PIDs from the service manager and socket listing. Two installations can use different configuration trees while targeting the same port.
- Inspect the PID file. A stale PID file can make service control report the wrong process or prevent a clean launch. Confirm the process state before removing any file, and use the service’s normal stop procedure whenever possible.
- Slow down rapid stop/start cycles. A restart may retain old sockets, and an immediate start can race with shutdown. Use a complete stop, verify process exit, then start once.
- Review automatic recovery. A supervisor that restarts Apache after every failure can continually recreate the collision. Pause that loop during diagnosis and inspect its unit or task definition.
- Re-test the final state. The expected listener should appear exactly once on the intended address, with the expected Apache PID or front-end service.
Validate service ownership after the repair
Repeat the platform’s socket command and confirm all of the following:
- The intended service, not an accidental process, owns port 80.
- The address family and interface scope match the design: IPv4 wildcard, IPv6 wildcard, or a specific assigned address.
- Apache has no duplicate or overlapping
Listendirectives in its loaded configuration. - The service manager reports one healthy Apache instance rather than repeated failed launches.
- SELinux or AppArmor logs show no denial for the chosen binding.
- Requests reach the expected virtual host or reverse-proxy route after the listener comes up.
Prevent the conflict from returning
- Keep one documented owner for each public address and port.
- Record every intentional
Listenline and the included file that defines it. - Use configuration tests in deployment procedures before restarting Apache.
- Monitor for duplicate service definitions, second installations, and container port publications.
- Document whether Apache binds all interfaces or only a specific address, especially on hosts with changing network assignments.
- Keep the SELinux or AppArmor rule that permits the chosen port under configuration management.
- Use a full stop/start for binding changes and verify the socket afterward.
The essential rule
“Address already in use” is a socket-ownership problem until proven otherwise. Identify the PID, inspect every Apache binding, verify the address and security policy, then change only the service or directive that is actually wrong. A controlled stop/start and a final listener check turn a vague startup failure into a verifiable fix.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

