不灭的焱

加密类型:SHA/AES/RSA下载Go
复合类型:切片(slice)、映射(map)、指针(pointer)、函数(function)、通道(channel)、接口(interface)、数组(array)、结构体(struct) Go类型+零值nil
引用类型:切片(slice)、映射(map)、指针(pointer)、函数(function)、通道(channel) Go引用

作者:AlbertWen  添加时间:2016-01-06 09:59:02  修改时间:2025-11-27 06:57:41  分类:06.Linux软件安装  编辑

在Ubuntu 12中启动刚安装好的Nginx,报错:

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

原因如下:

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

所以说:

要么换用户为 root,要么改端口,,,因为是本地开发环境,所以我选择了改端口(8088)!

 

 

参考:

http://stackoverflow.com/questions/18480201/ubuntu-nginx-emerg-bind-to-0-0-0-080-failed-13-permission-denied