作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我知道这个问题已经被研究了很多,但这里的解决方案并没有解决它们。
让我们从一些背景信息开始:
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 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
#
# 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>
最佳答案
您的 httpd.conf
中的以下行文件正确:
ServerName localhost
/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/
我是一名优秀的程序员,十分优秀!