1
votes

I've installed fresh install of XAMPP on a Mac. I've set up Virtual Hosts correctly but for some reason when I turn XAMPP on I get an error like so...

AH00112: Warning: DocumentRoot [/Applications/XAMPP/xamppfiles/\xe2\x80\x9c/Users/mac-user/Sites/domain/httpdocs\xe2\x80\x9d] does not exist (2)No such file or directory: AH02291: Cannot access directory '/Applications/XAMPP/xamppfiles/\xe2\x80\x9c/Users/mac-user/Sites/domain/' for error log of vhost defined at /Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf:34 AH00014: Configuration check failed

Here's my VH config...

<VirtualHost *:80>
 ServerAdmin [email protected]
 DocumentRoot “/Users/mac-user/Sites/domain/httpdocs”
 ServerName khemistry.dev
 ServerAlias khemistry.dev
 ErrorLog “/Users/mac-user/Sites/domain/error”
 CustomLog “/Users/mac-user/Sites/domain/custom” common
 <Directory “/Users/mac-user/Sites/domain/httpdocs”>
     Options Indexes FollowSymLinks Includes execCGI
     AllowOverride All
     Require all granted
 </Directory>
</VirtualHost>

What I have noticed is for some reason Apache is prefixing this /Applications/XAMPP/xamppfiles/\xe2\x80\x9c to the path and I don't know why.

Please help. It's driving me insane.

If you need any more information please ask.

1

1 Answers

6
votes

You've actually got two persistent errors in your config, left double quotation marks and right double quotation marks; this is caused by using a word-processing program instead of a plain text editing program to edit your files. Example:

“/Users/mac-user/Sites/domain/httpdocs”

This should be:

"/Users/mac-user/Sites/domain/httpdocs"

Your VHost config is full of these - just change them all to plain double quotes and it'll work.

Edit: I've edited the VirtualHost code in your question because it was all on one single line - hopefully it makes it easier to see all of the left-and-right double quotes that need changing to plain double quotes. The below directive (copy-and-paste it) will work:

<VirtualHost *:80>
 ServerAdmin [email protected]
 DocumentRoot "/Users/mac-user/Sites/domain/httpdocs"
 ServerName khemistry.dev
 ServerAlias khemistry.dev
 ErrorLog "/Users/mac-user/Sites/domain/error"
 CustomLog "/Users/mac-user/Sites/domain/custom" common
 <Directory "/Users/mac-user/Sites/domain/httpdocs">
     Options Indexes FollowSymLinks Includes execCGI
     AllowOverride All
     Require all granted
 </Directory>
</VirtualHost>