Reputation: 7436
Getting the below error when starting apache 2.4.
httpd[11435]: AH00526: Syntax error on line 22 of /etc/httpd/conf.d/vhost1.conf:
httpd[11435]: Require not allowed here
The following line causes this error in vhost1.conf
<VirtualHost myserver:80>
DocumentRoot "/var/www/html"
Require all granted
</VirtualHost>
<VirtualHost myserver:443>
DocumentRoot "/var/www/html"
Require all granted
</VirtualHost>
What is wrong with this? How can I fix the error?
Upvotes: 2
Views: 1828
Reputation: 1741
You need to use Require inside Directory. i.e
<Directory "/var/www/html">
Require all granted
<Directory>
Upvotes: 2