(ubuntu) nginx: [emerg] bind() to 0.0.0.0:80 failed (13: permission denied)

user2350858 picture user2350858 · Aug 28, 2013 · Viewed 59.9k times · Source

I need help figuring out the root cause of this permission denied error. What permissions does nginx need? Why is it so complicated?

Answer

vvy picture vvy · Aug 28, 2013

the socket API bind() to a port less than 1024, such as 80 as your title mentioned, need root access.

here is "Bind to ports less than 1024 without root access"

and another easier way is to run nginx as root.