Apache not finding folder on File System; Appending “\xe2\x80\x9d” to end of File Paths

apache-2.2mac-osxvirtualhost

I have three Virtual Hosts running in apache2 on my personal Macintosh running OS X Mavericks and I have ran into a knot of confusion. They are configured in my httpd-vhosts.conf file as follows:

<VirtualHost *:80>
DocumentRoot "/Library/WebServer/Documents"
ServerName localhost
ServerAlias localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Library/WebServer/Documents/dev1"
ServerName dev1.local
ServerAlias www.dev1.local
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Library/WebServer/Documents/dev2"
ServerName dev2.local
ServerAlias www.dev2.local
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Library/WebServer/Documents/dev3”
ServerName dev3.local
ServerAlias www.dev3.local
</VirtualHost>

Note: The first entry allows me to type in "localhost" and have it load as you'd expect it to without Virtual Hosts running.

dev1 and dev2 work fine, but I get an Error 404 saying "The requested URL / was not found on this server." when I try to load dev3 on the local machine. All three Dev folders have the same permissions I have verified the names. When I checked the error_log I found this:

[Fri Jan 24 12:55:07 2014] [error] [client 127.0.0.1] File does not
exist: /Library/WebServer/Documents/dev3\xe2\x80\x9d

Does anyone know why Apache is appending a "\xe2\x80\x9d" to the end of the Folder path, or why dev3 isn't loading? (I suspect these randomly appended characters are why) Any input welcome! Thanks for reading!

Best Answer

DocumentRoot "/Library/WebServer/Documents/dev3”
                                               ^----- no proper quotation mark :9

If you have php installed:

<?php
echo "\xe2\x80\x9d";

// or

echo utf8_decode("\xe2\x80\x9d");

// should give you ”
Related Topic