Nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
Nginx isn't allowed to bind that port — a privileged port as non-root, or SELinux restricts it.
nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)bind() to 0.0.0.0:8081 failed (13: Permission denied)[emerg] bind() to [::]:80 failed (13: Permission denied)nginx bind permission denied SELinuxnginx: [emerg] bind() to 0.0.0.0:80 failed (13 Meaning
Ports below 1024 need root (the master process starts as root normally). Under systemd it works; running nginx as a normal user or in rootless containers fails. On SELinux hosts a non-standard port needs semanage port -a -t http_port_t -p tcp 8081. Also check that no other service uses the port (different error, 98).
Common causes
- Started nginx as a non-root user
- SELinux blocking a custom port
- Rootless container/Podman binding < 1024
- AppArmor profile
- systemd hardening limiting capabilities
⚡ Quick fix
- Start via systemd:
sudo systemctl start nginx - SELinux:
sudo semanage port -a -t http_port_t -p tcp 8081 - Use a port > 1024 or grant
net_bind_service
Detailed fix by platform
Linux
getenforce; sudo ausearch -m avc -ts recent | tailshows SELinux denials
How to diagnose
- User — root or systemd?
- SELinux — Enforcing?
- Port — < 1024?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- 403 HTTP 403 Forbidden
- AH00015: Unable to open logs Apache: AH00091: apache2: could not open error log file /var/log/apache2/error.log. AH00015: Unable to open logs (Permission denied)
- AH00072: make_sock: could not bind to address 0.0.0.0:80 Apache: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 / AH00015: Unable to open logs
Most viewed in Nginx / Apache
- nginx: [emerg] unknown directive Nginx: nginx: [emerg] unknown directive "x" in /etc/nginx/sites-enabled/x:12 — configuration file test failed
- upstream timed out Nginx: upstream timed out (110: Connection timed out) while reading response header from upstream
- AH00558 Apache: AH00558: apache2: Could not reliably determine the server's fully qualified domain name
Other ways to find it
Where this error sits
Origin: Edge & web server. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026