(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
Quick fix: another process already owns port 80 (or 443). Find it, stop it, then start Apache:
sudo ss -ltnp 'sport = :80' # shows the process name and PID holding port 80
sudo systemctl stop nginx # if it's Nginx (use the service you found)
sudo systemctl start apache2 # httpd on RHEL, Rocky, AlmaLinux and Fedora
The number in brackets at the start of the line is the operating system error. (98) is EADDRINUSE: the port is taken. Section 4 covers the other numbers you may see, (13) and (99), which have different fixes.
AH00015: Unable to open logs on the next line is usually a side effect, not a second problem. It goes away once the bind error is fixed.
1. Find the process holding the port
# ss (installed on every modern Linux)
sudo ss -ltnp 'sport = :80 or sport = :443'
# lsof
sudo lsof -nP -iTCP:80 -sTCP:LISTEN
Example output:
LISTEN 0 511 0.0.0.0:80 0.0.0.0:* users:(("nginx",pid=812,fd=6))
Here Nginx (PID 812) owns port 80. If the command prints nothing, no other process holds the port, and Apache is clashing with itself: go to section 3.
2. Stop whatever owns the port
| The port is owned by | Check | Fix |
|---|---|---|
| Nginx | systemctl status nginx | sudo systemctl stop nginx && sudo systemctl disable nginx |
| An old Apache process | pgrep -a apache2 or pgrep -a httpd | sudo pkill apache2 (or httpd), then start it with systemd |
A Docker container (docker-proxy) | docker ps --format '{{.Names}} {{.Ports}}' | Stop the container or publish it on another port |
| Caddy, Traefik, lighttpd or Varnish | systemctl status caddy (etc.) | Stop and disable it, or move it to another port |
An old Apache that systemd doesn't know about
If someone started Apache with apachectl start or a bare httpd command, that copy keeps the ports open, and systemctl start then fails with AH00072. Stop every Apache process and start it once, under systemd:
sudo systemctl stop apache2
sudo pkill apache2
sudo ss -ltnp 'sport = :80' # should print nothing now
sudo systemctl start apache2
Running both Nginx and Apache on purpose
A common setup puts Nginx in front on ports 80 and 443 and Apache behind it on another port. In that case Apache must not listen on 80 at all. On Debian and Ubuntu, change /etc/apache2/ports.conf:
Listen 127.0.0.1:8080
Then change each <VirtualHost *:80> to <VirtualHost 127.0.0.1:8080> and point Nginx at it with proxy_pass http://127.0.0.1:8080;.
3. No other process: a duplicate Listen line
If ss shows nothing on the port but Apache still fails with error 98, two Listen directives in your own configuration ask for the same port. Apache tries to open the socket twice and the second attempt fails.
List every Listen line, including all included files:
# Debian and Ubuntu
sudo grep -rnE '^\s*Listen\s' /etc/apache2/
# RHEL, Rocky, AlmaLinux and Fedora
sudo grep -rnE '^\s*Listen\s' /etc/httpd/
Typical duplicates:
Listen 80in bothports.confand a site file. On Debian and Ubuntu,Listenbelongs only inports.conf. Remove it from files insites-available/.Listen 443added by hand next tossl.conf. On RHEL systems,/etc/httpd/conf.d/ssl.confalready containsListen 443 https. AddingListen 443inhttpd.confas well causes the error for port 443.Listen 80andListen 0.0.0.0:80together.Listen 80already covers every address, so the second line overlaps with it.
Keep one Listen line per port, then start Apache again.
Why apachectl configtest says Syntax OK
apachectl configtest (or apache2ctl -t) checks the syntax only. It doesn't open the listening sockets, so it can't see that a port is already taken. A clean config test followed by a failed start almost always means one of the cases above.
4. The same AH00072 with a different error number
| Message starts with | Meaning | Fix |
|---|---|---|
(98)Address already in use | Port taken | Sections 1 to 3 |
(13)Permission denied | Not allowed to use that port | See below |
(99)Cannot assign requested address | The IP in Listen isn't on this server | Fix the IP, or use Listen 80 |
(OS 10048)Only one usage of each socket address | Port taken (Windows) | See below |
(13) Permission denied
Two common causes:
-
Apache was started as a normal user. Ports below 1024 need root. Start it with
sudo systemctl start apache2, not as your own user. -
SELinux blocks a custom port on RHEL systems, for example
Listen 8081. Allow the port for web servers:sudo semanage port -a -t http_port_t -p tcp 8081 sudo systemctl start httpd
Windows and XAMPP
On Windows the same error shows as (OS 10048). Find the owner of the port:
netstat -ano | findstr :80
The last column is the PID; look it up in Task Manager on the Details tab. If the PID is 4 (System), Windows itself is using port 80 through IIS or the "World Wide Web Publishing Service". Stop and disable that service in services.msc, or move Apache to another port by changing Listen 80 to Listen 8080 in httpd.conf.
5. Avoid it next time
- Always manage Apache through systemd. Avoid starting it with
apachectl starton servers that usesystemctl. - Reload instead of restart after config changes.
sudo apachectl configtest && sudo systemctl reload apache2keeps the listening sockets open. - Remove web servers you don't use. If Nginx was installed by accident, remove it so it can't take port 80 after a reboot.
- Keep
Listenlines in one place. On Debian and Ubuntu that isports.conf.
6. Know when it happens on a live server
This error appears when Apache is restarted: after a deploy, an upgrade or a reboot. Apache stops, every site on the server goes down, and you find out from users.
With Pingzo, an HTTP monitor checks your site every 1 to 15 minutes depending on your plan. An incident opens when 3 of the last 5 checks fail, and alerts go to WhatsApp, Slack, Telegram, Discord or email. A port monitor on 80 and 443 also shows whether anything is accepting connections on the server's web ports.
Related guides
- Fix: nginx bind() to 0.0.0.0:80 failed (98: Address already in use)
- Fix Apache "Could not reliably determine the server's fully qualified domain name"
- Fix Apache "client denied by server configuration"
- Fix Apache "SSLProxyEngine not enabled"
Stop Finding Out About Outages from Angry Users
Get instant WhatsApp & Discord alerts the second your API, website, or server goes down. Setup in 30 seconds, with checks as often as every minute.