Virtual Host and Object not found

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Virtual Host and Object not found

Postby slackjaw47 » 27. August 2010 21:19

Hello all, I have a problem I have multiple sites in my htdocs folder which isn't a problem but in php the Document root will change when I go to production server and I don't want to have to modify all my requires and includes once I go live. Here are the steps I took per, oh, I don't know, 50 websites with tutorials on how to do it. But here are the steps I took.
1. I modified my host file.
2. I modified my httpd-vhost.conf by adding a virtual host for my local host:
<VirtualHost *:80>
ServerName localhost
DocumentRoot “/Applications/XAMPP/xamppfiles/htdocs”
<Directory “/Applications/XAMPP/xamppfiles/htdocs”>
Options Indexes FollowSymLinks
AllowOverride None
Order Allow,Deny
Allow From All
</Directory>
</VirtualHost>

The idea is that if I can get this to work then I can add other virtual hosts.

3. I then uncommented the line in my httpd.conf file that says "Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf"
4. I restarted my server.
5. The web page gives me a 404 Error: Object not found.
6. If I comment the line in the httpd.conf file out again I get to the local host splash page for XAMPP.
7. Help I have looked and looked and looked and looked and looked... did I say that I looked?... in Google for the solution... a lot of people have come across this same problem. And either there are no replies or the poster says, "I fixed it without posting the solution." Any one? Any one? Thanks in advance.
slackjaw47
 
Posts: 2
Joined: 27. August 2010 21:08

Re: Virtual Host and Object not found

Postby slackjaw47 » 27. August 2010 22:50

As I was looking through another post that was vaguely related to my problem someone suggested to look in the error log. The error that I got, I had seen before: "File does not exist: /Applications/XAMPP/xamppfiles/\xe2\x80\x9c" Well I knew what the first part was, duh. I didn't know how the "\xe2\x80\x9c" kept getting there. So I did a search for that. As it turns out that is the UTF-8 code for the HTML Entity '&ldquo;'. Well as most people when they look through web post about how to accomplish something, I copied and pasted someone's solution and customized it for mine. In text edit I couldn't tell right off but upon further inspection it was curly quotes in the definition of my virtual hosts. I knew about this causing problems in web pages if I copied text from a Word Processing program... I didn't think that it would be an issue in a text editor such as TextMate. But once I replaced the curly quotes with straight quotes, viola... winner winner, chicken dinner.

I hope this helps someone out there who has been struggling. And be aware of copying code from a site. Just because you've been doing it for 10 years doesn't mean that you're immune to these problems... infact, once you decide you're past that kind of problem, that's when it happens. haha. Good luck.
slackjaw47
 
Posts: 2
Joined: 27. August 2010 21:08

Re: Virtual Host and Object not found

Postby IQ100 » 15. January 2011 16:45

Yeah ... that (\xe2\x80\x9c) is ssl-crypted data. I search anythink what can convert in a readable line! Please Help!

Yeah ... das (\xe2\x80\x9c) sind ssl-verschlüsselte daten. Ich suche irgendwas was das in lesbare Zeilen konvertieren kann! Bitte um Hilfe!
IQ100
 
Posts: 12
Joined: 28. April 2010 00:47


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 1 guest