Apache重启报警,不存在虚拟主机目录 AH00112: Warning: DocumentRoot……
参考:https://www.cnblogs.com/tulips-lily/p/7070542.html
Apache重启时报警:
AH00112: Warning: DocumentRoot [/usr/local/apache/docs/dummy-host.example.com] does not exist问题原因:
Apache在配置虚拟主机时会在配置文件中(httpd.conf)开启虚拟主机的配置文件;
将“ #Include /etc/httpd/extra/httpd-vhosts.conf ”前面的“#”去掉;
而“httpd-vhosts.conf ”中会有两个配置虚拟主机的例子:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "/usr/local/apache/docs/dummy-host.example.com"
ServerName dummy-host.example.com
ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error_log"
CustomLog "logs/dummy-host.example.com-access_log" common
</VirtualHost>
解决方法:
注销不要的虚拟主机代码即可。