需要brew来覆盖/ usr / local / etc / httpd /

时间:2019-03-16 20:38:59

标签: macos apache homebrew httpd.conf

我正在努力重新安装httpd。

我修改了ServerRoot而不是DocumentRoot,并且不记得原始值。

实际上,没有任何brew uninstall httpd / brew reinstall --force httpd组合删除/ usr / local目录中的文件。或者从全新安装中使用默认值覆盖它们。

我不确定是否应该自己删除它们。

但是基本上我要做的是完全全新安装httpd。

预先感谢。

1 个答案:

答案 0 :(得分:0)

我做了这些步骤,然后一个或多个步骤解决了这个问题。

cd /usr/local/etc/httpd
mkdir ~/httpd
mv * ~/httpd
brew install -s -f -v  httpd

RBAINDOU-M-4116:httpd robert$ cat httpd.conf | grep -i root
# with "/", the value of ServerRoot is prepended -- so "logs/access_log"
# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
# ServerRoot: The top of the directory tree under which the server's
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# same ServerRoot for multiple httpd daemons, you will need to change at
ServerRoot "/usr/local/opt/httpd"
# httpd as root initially and it will switch.
# DocumentRoot: The directory out of which you will serve your
DocumentRoot "/usr/local/var/www"
    # access content that does not live under the DocumentRoot.
RBAINDOU-M-4116:httpd robert$