0
我想智能缩进我的apache2虚拟主机conf文件。 我找到here如何智能缩进xml文件。但虚拟主机conf文件不是有效的xml文件。使用xmllint格式apache2虚拟主机conf
举例来说,如果我尝试使用其上的Apache2的库提供的000-default.conf xmllint,我得到一个错误:
$ cat 000-default.conf | xmllint --format -
-:1: parser error : error parsing attribute name
<VirtualHost *:80>
^
-:1: parser error : attributes construct error
<VirtualHost *:80>
^
-:1: parser error : Couldn't find end of Start Tag VirtualHost line 1
<VirtualHost *:80>
^
-:1: parser error : Extra content at the end of the document
<VirtualHost *:80>
^
没有任何一个有关于如何处理这个线索?
谢谢你的回答。我不明白你的句子'因此,请在apache2配置文件上使用xmllint,并且避免上面突出显示的错误。' – Dionys 2014-10-27 10:53:17
它缺少重要的词'不' - 现在已修复。 – abligh 2014-10-27 17:07:10