在 OSX 中配置我的 Apache 虚拟主机的正确位置在哪里?
Where is the right place to configure my Apache vhosts in OSX?
昨晚我将我的笔记本电脑从 Mojave 更新到 Catalina,今天早上我意识到我丢失了所有 Apache 虚拟主机,我的虚拟主机文件被默认文件替换了。
我的所有虚拟主机都在 /usr/local/etc/httpd/extra/httpd-vhosts.conf
我想知道哪种方法是正确的(存储我的虚拟主机),所以我(希望)不会在未来的更新中丢失我的虚拟主机。
谢谢!!
P.D。我正在使用 "native" Apache,而不是 Homebrew。
作为升级的一部分,Catalina 移动了根目录文件。参见 https://apple.stackexchange.com/questions/371852/where-does-the-upgrade-to-macos-catalina-move-root-directory-files
来自回答:This took me a long time to figure out, but any file that was formerly at, e.g., /my-cool-directory was moved to /Users/Shared/Relocated Items/Security/my-cool-directory.
您可以尝试检查 /Users/Shared/Relocated Items/Security 文件夹中的原始 Apache 文件。
这取决于您在 httpd.conf
文件中包含的内容。
您可以尝试使用自定义创建的虚拟主机文件,例如。 Include /private/etc/apache2/extra/mycustom-httpd-vhosts.conf
下次
在上次 catalina 更新后,我的自定义文件没有移出它们的位置。
我在更新到 catalina 时遇到了同样的问题。我所有的更改都没有了。
默认情况下,httpd.conf
包含 other
目录中的配置文件:
Include /private/etc/apache2/other/*.conf
我现在将我的 vhosts 和 userdir 配置放在这个目录中。看起来它工作得很好。我在那里的另一个自定义文件没有被更新触及。
昨晚我将我的笔记本电脑从 Mojave 更新到 Catalina,今天早上我意识到我丢失了所有 Apache 虚拟主机,我的虚拟主机文件被默认文件替换了。 我的所有虚拟主机都在 /usr/local/etc/httpd/extra/httpd-vhosts.conf
我想知道哪种方法是正确的(存储我的虚拟主机),所以我(希望)不会在未来的更新中丢失我的虚拟主机。
谢谢!!
P.D。我正在使用 "native" Apache,而不是 Homebrew。
作为升级的一部分,Catalina 移动了根目录文件。参见 https://apple.stackexchange.com/questions/371852/where-does-the-upgrade-to-macos-catalina-move-root-directory-files
来自回答:This took me a long time to figure out, but any file that was formerly at, e.g., /my-cool-directory was moved to /Users/Shared/Relocated Items/Security/my-cool-directory.
您可以尝试检查 /Users/Shared/Relocated Items/Security 文件夹中的原始 Apache 文件。
这取决于您在 httpd.conf
文件中包含的内容。
您可以尝试使用自定义创建的虚拟主机文件,例如。 Include /private/etc/apache2/extra/mycustom-httpd-vhosts.conf
下次
在上次 catalina 更新后,我的自定义文件没有移出它们的位置。
我在更新到 catalina 时遇到了同样的问题。我所有的更改都没有了。
默认情况下,httpd.conf
包含 other
目录中的配置文件:
Include /private/etc/apache2/other/*.conf
我现在将我的 vhosts 和 userdir 配置放在这个目录中。看起来它工作得很好。我在那里的另一个自定义文件没有被更新触及。