nginx: bind() to 0.0.0.0:80 failed (13: Permission denied) Nginx / Apache Origin: Edge & web server OSI layer 4 · Transport Last updated 5 Nov 2026

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.

Exact message you may see 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
Seen on: Nginx Linux

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

  1. Start via systemd: sudo systemctl start nginx
  2. SELinux: sudo semanage port -a -t http_port_t -p tcp 8081
  3. Use a port > 1024 or grant net_bind_service

Detailed fix by platform

Linux

  1. getenforce; sudo ausearch -m avc -ts recent | tail shows SELinux denials

How to diagnose

  1. User — root or systemd?
  2. SELinux — Enforcing?
  3. 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:

Where this error sits

Origin: Edge & web server. Errors that are often confused with or caused by this one (click to open):

403 — HTTP 403 Forbidden (HTTP)403AH00015: 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) (Nginx / Apache)AH00015: Unable to op…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 (Nginx / Apache)AH00072: make_sock: c…AH00112: DocumentRoot does not exist — Apache: AH00112: Warning: DocumentRoot [/var/www/example.com/public_html] does not exist (Nginx / Apache)AH00112: DocumentRoot…avc: denied — SELinux is preventing ... / avc: denied { read } for pid=... (permission denied despite correct permissions) (Linux)avc: deniedbind() failed (98: Address already in use) — nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) (Linux)bind() failed (98: Ad…connect() to unix:/run/php/php-fpm.sock failed (13: Permission denied) — Nginx: [crit] connect() to unix:/run/php/php8.3-fpm.sock failed (13: Permission denied) while connecting to upstream (Nginx / Apache)connect() to unix:/ru…EPERM — Error: EPERM: operation not permitted, rename / unlink (Node.js)EPERMnginx: bi…

Explore the map of this error Full error map →

🧠 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.