(ubuntu)nginx:[emerg] bind()到0.0.0.0:80失败(13:权限被拒绝)

问题描述:

我需要帮助找出此权限被拒绝错误的根本原因. nginx需要什么权限?为什么这么复杂?

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

套接字API bind()到小于1024的端口(如您提到的端口80)需要root访问权限.

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

这是">绑定到小于1024且没有root的端口访问"

另一种更简单的方法是以root身份运行nginx.

and another easier way is to run nginx as root.