【发布时间】:2026-01-23 04:00:01
【问题描述】:
我在 localhost 和 PHP 5.5.8 上遇到 apache2 问题。在 Macosx 上 一切都是用 Homebrew 安装的。
延迟的原因可能是什么? 当我想停止服务器时,它有时会响应
httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.43.114 for ServerName
我就是这样设置的
<VirtualHost *:80>
ServerAdmin webmaster@test.dev
DocumentRoot "/Users/redres/Webdev/testsetup/public"
ServerName test.dev
ServerAlias test.dev
<Directory "/Users/redres/Webdev/testsetup/public">
Options FollowSymLinks Indexes MultiViews
Options All
AllowOverride All
Order allow,deny
Allow from All
Header Set Cache-Control no-cache
</Directory>
</VirtualHost>
【问题讨论】:
-
我知道在 macosx 下为 vhost 使用
.local地址时会有 5 秒的延迟,因为某些 bonjour 特定的查找。鉴于您没有使用 .local,那么您需要提供有关您的问题的更多信息以获得帮助。 -
你需要什么,我有一个自制软件的基本安装,所以这就是我所做的全部设置,加上主机文件。
-
@Dagon,谢谢。我也遇到了那个链接,我正在阅读它。另外,也许这里有人在迁移到 apache2 时遇到了同样的问题。
标签: php macos apache localhost