gpt4 book ai didi

apache - 获取消息 AH00558 : apache2:

转载 作者:太空宇宙 更新时间:2023-11-03 16:54:00 24 4
gpt4 key购买 nike

Restarting web server apache2
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1.
Set the 'ServerName' directive globally to suppress this message

我是安装 Ubuntu 的新手,有人可以帮助我提供设置它所需的命令吗?我已经尝试了 vim/etc/apache2/apache2.conf 并添加了本地主机,但是当我重新启动 Apache2 服务器时我仍然收到消息。

最佳答案

快速但不是那么优雅的解决方案:

导航到文件 - apache2.conf,我会使用终端,步骤如下:

  1. cd/etc/apache2/

    2.vim apache2.conf(或pluma apache2.conf,如果你不是 vi-geek)

  2. 在底部写上:

    • 服务器名称本地主机
  3. 保存文件并重启apache,在终端中使用以下命令:

    • /etc/init.d/apache2 重启可以使用一些 UI 或其他命令,例如“service apache2 restart”。

就此而言,您可以进行检查,以查看以太此指令 在某些配置中不仅被禁用文件:

  • grep -inRH "ServerName "/etc/apache2/| grep "\s#"*

现在错误消失了。所有这些步骤都需要 root 权限,或者改用“sudo”。

希望我能帮到你。干杯

关于apache - 获取消息 AH00558 : apache2:,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32517159/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com