Apache setup: directive requires additional arguments

I am trying to use an Apache (only localhost). When I do apachectl configtest I get the following response:

AH00526: Syntax error on line 238 of /private/etc/apache2/httpd.conf:
<Directory> directive requires additional arguments

The corresponding part of the httpd.conf file is

DocumentRoot /Library/WebServer/Documents/
<Directory /> Options Indexes SymLinks MultiviewsMatch Any AllowOverride None Require all granted
</Directory>

I consulted several forums / the Apache documentation but I cannot see the mistake. Does anybody know how to solve this?

1 Answer

What is the idea of using ~ in http.conf?. Assuming you meant a user home directory: apache http.conf is not a bash script so expanding will not happen. You need either absolute paths or a relative path to the apache root.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like