当尝试重新启动 Apache(使用service apache2 restart
:)时,出现以下错误:
/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
当我尝试使用另一个命令(sudo /etc/init.d/apache2 restart
)重新启动它时,出现以下错误:
* Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified
domain name, using 127.0.1.1 for ServerName ... waiting apache2:
Could not reliably determine the server's fully qualified domain name,
using 127.0.1.1 for ServerName
我之前曾编辑etc/apache2/httpd.conf
过:
ServerName localhost
为了解决上述问题,但似乎没有奏效。
有人能帮我解决这个问题吗?
答案1
我会被大家嘲笑的。我也遇到了这个错误;我忘记了最重要的 sudo
sudo service apache2 restart