Apache El capitan OS X Server 5.1升级打破虚拟主机

Apache El capitan OS X Server 5.1升级打破虚拟主机,apache,virtualhost,osx-elcapitan,osx-server,Apache,Virtualhost,Osx Elcapitan,Osx Server,我运行OSX服务器已经两年了,或多或少遇到了一些问题。昨天,我更新到服务器5.1,web服务器完全崩溃。所有设置都会在服务器应用程序的Web部分面板中显示 然而,在寻找该网站时,Safari没有找到它。我花了几个小时研究这个问题,发现virtual_host_global.conf只包含以下内容: # This file is auto-generated by the Server application's # configuration mechanism whenever settin

我运行OSX服务器已经两年了,或多或少遇到了一些问题。昨天,我更新到服务器5.1,web服务器完全崩溃。所有设置都会在服务器应用程序的Web部分面板中显示

然而,在寻找该网站时,Safari没有找到它。我花了几个小时研究这个问题,发现virtual_host_global.conf只包含以下内容:

# This file is auto-generated by the Server application's
# configuration mechanism whenever settings are saved.
# The Listen directives are generated
# based on the VirtualHost directive inside
# each site configuration file found in this directory.

Listen  127.0.0.1:34543
Listen  127.0.0.1:34580
在手动将其更新为此

# This file is auto-generated by the web configuration
# mechanism whenever settings are saved.
# The Listen and NameVirtualHost directives are generated
# based on the VirtualHost directive inside
# each site configuration file found in this directory.
#
Listen  *:443
Listen  *:80
重新启动服务器,一切恢复正常。但是,如果我从服务器应用程序更改设置,应用程序将重写此文件并破坏所有内容

我不明白为什么它从一个简单的更新中断。有人知道如何使我的修改永久化吗?每次我从服务器UI更改某些内容时,需要更改服务器应用程序中的哪些配置文件或项目才能使其正常工作


谢谢

我终于解决了我的问题

首先,我在这里找到了文档

/Library/Server/Web/Config/apache2/ReadMe.txt

在本文档中,我找到了一个将服务器服务重置为出厂设置的命令(注意在/Library/server/Web/folder之前保存数据)

sudo/Applications/Server.app/Contents/ServerRoot/usr/sbin/serveradmin command web:command=restoreFactorySettings

重置后,网站服务运行良好。我真的不知道服务器更新时出了什么问题。但是我怀疑有什么事情,因为我注意到在工厂设置重置之前,默认站点上没有新的重定向参数

以下是重定向面板的详细信息:

因此,如果您对新OSX服务器应用程序的Web服务部分有如此大的问题。不要犹豫,将其重置为出厂设置,因为升级可能会破坏它