gpt4 book ai didi

localhost - 更新到 High Sierra 之前,httpd-vhosts.conf 为空

转载 作者:行者123 更新时间:2023-12-02 23:05:22 25 4
gpt4 key购买 nike

我刚刚从 Sierra 升级到 High Sierra。

显然一切正常。但是,当在本地测试我的作品(PHP 中的 Web 开发等)时,我发现没有一个有效。

检查并查找错误可能出在哪里,我去看了一下我所有的虚拟主机都很好,我发现虚拟主机文件有超过 10 个配置元素,只有 2 个虚拟主机测试主机

更新后的虚拟主机文件内容为:

<VirtualHost *:80>
ServerAdmin <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7f081a1d121e0c0b1a0d3f1b0a1212065217100c0b511a071e120f131a511c1012" rel="noreferrer noopener nofollow">[email protected]</a>
DocumentRoot "/usr/docs/dummy-host.example.com"
ServerName dummy-host.example.com
ServerAlias www.dummy-host.example.com
ErrorLog "/private/var/log/apache2/dummy-host.example.com-error_log"
CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log" common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="235446414e42505746516347564e4e5a0e4b4c5057110d465b424e534f460d404c4e" rel="noreferrer noopener nofollow">[email protected]</a>
DocumentRoot "/usr/docs/dummy-host2.example.com"
ServerName dummy-host2.example.com
ErrorLog "/private/var/log/apache2/dummy-host2.example.com-error_log"
CustomLog "/private/var/log/apache2/dummy-host2.example.com-access_log" common
</VirtualHost>

我的虚拟主机文件是:/etc/apache2/extra/httpd-vhosts.conf

我可以通过某种方式恢复该内容吗?我肯定丢失了那些虚拟主机配置吗?

最佳答案

我不知道我的消息应该是评论还是答案。

我遇到了同样的问题,但幸运的是更新保留了您的文件。

我在以下位置找到了最后一个 httpd 虚拟主机:

httpd-vhosts.conf~previous

我建议看一下

/etc/apache2/

文件夹,也许是你以前的文件夹

httpd.conf 

已备份在“~previous”命名下,您可以恢复它或更改当前的。

运行:

sudo apachectl --test

检查是否一切正常。

关于localhost - 更新到 High Sierra 之前,httpd-vhosts.conf 为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48020990/

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