0

System details:

  • OS Host: Mac OS Mojave
  • PHP: 7.1.23

I am trying to set up my local server on a new Mac. I have been following the following instructions on https://discussions.apple.com/docs/DOC-13841.

After enabling PHP, perl and personal websites, I check the configuration with apachectl configtest and the terminal returns the following:

httpd: Syntax error on line 511 of /private/etc/apache2/httpd.conf: Syntax error on line 16 of /private/etc/apache2/extra/httpd-userdir.conf: No matches for the wildcard '*.conf' in '/private/etc/apache2/users', failing (use IncludeOptional if required)

However, I am expecting syntax OK. What should I do to fix this?

  • Lack of full configuration file. – Simba Sep 11 at 17:44
1

It sounds like you do actually not have any configuration files in the /private/etc/apache2/users/ directory, and thus you cannot include them - therefore the configuration check fails.

If you have users on your system with shared a shared Sites folder, you would usually have configuration files in this directory named username.conf with the following contents:

<Directory "/Users/username/Sites/">
    Options Indexes MultiViews
    Require all granted
</Directory>

(Note: You'll need to replace "username" in the filename and the contents with the actual name of the user)

  • If I create this file will it fix it? From researching online many people are having a similar problem. – Dominic Norton Sep 3 at 9:21
  • Yes. That’s why I suggested it... – jksoegaard Sep 8 at 14:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .