启用“mod_rewrite”后 Apache2 服务器无法启动,返回“操作不允许”错误

启用“mod_rewrite”后 Apache2 服务器无法启动,返回“操作不允许”错误

我正在尝试安装cakephp(php 框架),这需要启用 mod_rewrite。为此,我遵循启用 mod_rewrite答案。但重启服务器后,它显示:

nitish@nitish-G31T-M7:~$ service apache2 restart

Restarting web server apache2 /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.

这是什么意思?我该如何启用mod_rewrite

答案1

您记得使用sudo重启命令吗?

如果没有,您必须具有超级用户权限 ( sudo) 才能重新启动 Apache。请尝试使用sudo service apache2 restart。您需要超级用户权限才能关闭当前实例,然后启动一个新实例并绑定到端口 80。

相关内容