在OS X更新到Sierra之后更改apache doc root

时间:2016-10-26 12:52:15

标签: apache

在Mac上。我使用与default / Library / WebServer / Documents不同的doc root。 所以/private/etc/apache/httpd.conf,/​​private/etc/apache/extra/httpd-ssl.conf和/private/etc/apache/extra/httpd-vhosts.conf设置为新的doc root。

但是每次mac更新都会将这些更新回到默认confs。不用担心只修复并重新启动apache。

除了今天对Sierra的更新。我无法从默认的doc root中获取apache。我编辑了/ Library / WebServer / Documents中的默认index.html并保存 - 只是为了确保它是显示的那个。

惊喜!它适用于自定义doc root。

但编辑该文件是如何解决问题的呢?我想节省下一次mac更新的时间!

1 个答案:

答案 0 :(得分:0)

尝试将文件更改为旧文档root sudo nano /Library/WebServer/Documents/index.html.en 它对我有用,可能在更新后有一些权限失败。