我的 httpd.conf 中有这个:
<VirtualHost *:80>
DocumentRoot "/var/www/html/example.com"
ServerName www.example.com
ServerAlias example.com
ErrorLog "%{DOCUMENT_ROOT}/error_log"
<Directory /var/www/html/example.com>
AllowOverride all
#Require all granted
#allow from all
Options -Indexes
</Directory>
</VirtualHost>
当我执行 sudo service httpd restart 我得到:
No such file or directory: AH02291: Cannot access directory '/etc/httpd/%{DOCUMENT_ROOT}/' for error log of vhost defined at /etc/httpd/conf/httpd.conf:380 AH00014: Configuration check failed
有没有办法将错误日志设置到虚拟主机的文档根目录?谢谢。