I have this in my 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>
When I do sudo service httpd restart I get:
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
Is there a way to set the error log to the documentroot of the virtualhost? Thanks.