gpt4 book ai didi

macos - httpd : Could not reliably determine the server's fully qualified domain name

转载 作者:行者123 更新时间:2023-12-03 21:30:33 25 4
gpt4 key购买 nike

我知道这个问题已经被研究了很多,但这里的解决方案并没有解决它们。

让我们从一些背景信息开始:

OS X 10.8.4
Apache 2.2.22

问题:
我在控制台中收到此错误,Apache 找不到我的本地主机,但启动正常。奇怪的。

[Sat Aug 17 13:40:06 2013] [info] mod_ssl/2.2.22 compiled against Server: Apache/2.2.22, Library: OpenSSL/0.9.8r
httpd: Could not reliably determine the server's fully qualified domain name, using Specter.local for ServerName

所以通常这会指向我的 ServerName 设置不正确。嗯,它是:/我尝试过不同的变体,如 Spectre.local、localhost 等

这是我的/private/etc/httpd.conf 的副本,这与/private/etc/apache2/httpd.conf 相同
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName localhost

我的主机文件设置如下:
127.0.0.1   localhost localhost.local
255.255.255.255 broadcasthost
127.0.0.1 themill.dev
127.0.0.1 phpmyadmin.dev
127.0.0.1 Specter.local

在我的/private/etc/apache2/users/ta.conf 是以下内容
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
# DEV: THEMILL SITE
<VirtualHost *:80>
ServerAdmin test@dummy.com
DocumentRoot "/Users/ta/Sites/themill/htdocs"
ServerName themill.dev
ServerAlias *.themill.dev
ErrorLog "/Users/ta/Sites/themill/log/error_log"
CustomLog "/Users/ta/Sites/themill/log/access_log" common
</VirtualHost>

# PHPMYADMIN
<VirtualHost *:80>
ServerAdmin test@dummy.com
DocumentRoot "/Users/ta/Sites/phpmyadmin"
ServerName phpmyadmin.dev
ServerAlias *.phpmyadmin.dev
ErrorLog "/Users/ta/Sites/phpmyadmin/log/error_log"
CustomLog "/Users/ta/Sites/phpmyadmin/log/access_log" common
</VirtualHost>

不确定还应该配置什么。它曾经可以工作,但是发布了 10.7 升级后,它从来没有工作过,现在我正在尝试解决它,它正在努力解决。

如果您需要更多信息,请告诉我。

最佳答案

您的 httpd.conf 中的以下行文件正确:

ServerName localhost

问题是在 macOS 上它是错误的文件(不是 /private/etc/httpd.conf )。

找到您的 httpd.conf 的正确位置Apache配置文件,运行:
apachectl -t -D DUMP_INCLUDES

然后仔细检查是否 ServerName取消注释并设置为 localhost .

关于macos - httpd : Could not reliably determine the server's fully qualified domain name,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18290683/

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