我已经使用三个简单的命令从源代码编译和安装了nginx
:
./configure
make
sudo make install
现在,当我尝试在默认用户下运行nginx
时,收到此消息:
nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
它也不能与sudo
一起使用,但有一个非常奇怪的错误:
sudo: nginx: command not found
所以有人知道:在这种情况下我该怎么办?
答案 0 :(得分:2)
将/usr/local/nginx/sbin
添加到PATH
中的/etc/environment
变量。