VirtualHost setup causes localhost to fail "Error 400&q

Problems with the Windows version of XAMPP, questions, comments, and anything related.

VirtualHost setup causes localhost to fail "Error 400&q

Postby edb » 27. April 2008 11:08

Hi everyone. I downloaded the most recent version of XAMPP and the local host was working fine, allowing me to have a little dabble with phpMyAdmin etc. I then went to set up a virtual host by doing the following;

1. in the windows 'hosts' file I added "127.0.0.1 apress"
2. httpd.conf file of apache 2.2.8 had this added

NameVirtualHost *

<VirtualHost *>
DocumentRoot "C:/Documents and Settings/Ed B/My Documents/Websites/Apress"
ServerName apress
</VirtualHost>

What happens now is the following error

======
Bad request!
Your browser (or proxy) sent a request that this server could not understand.

If you think this is a server error, please contact the webmaster.

Error 400
localhost
04/27/08 10:52:54
Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5
=======

This is absolutely killing me. I need to set up a virtualhost so I can test PHP in dreamweaver and I just CANNOT seem to set up a virtual host without this problem occuring. Even if it's just a guess, please do post some advice as I'm at my wit's end!

Best wishes Ed
edb
 
Posts: 4
Joined: 27. April 2008 11:02

Postby Wiedmann » 27. April 2008 11:14

This happens when you access the server with "http://apress/" in your webbrowser?

BTW:
Better use "*:80" instead of "*". You should also add a Directory-block for your DocumentRoot to allow access.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby edb » 27. April 2008 11:22

Hi Wiedmann,

Yes this happens on http://apress/ as well. I've changed it from "*" to "*:80" now. How do I add a Directory-block and what does that do? (thanks for the very quick reply)


=============

I've quickly uninstalled and reinstalled as the apache server wasn't able to restart and now I get the following message

"The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. "
edb
 
Posts: 4
Joined: 27. April 2008 11:02

Postby Wiedmann » 27. April 2008 15:40

"The server encountered an internal error

There was an Error 500?
--> Look into the "error.log".
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby edb » 27. April 2008 16:59

[Sun Apr 27 11:32:34 2008] [alert] [client 127.0.0.1] C:/Program Files/xampp/htdocs/xampp/.htaccess: Invalid file path C:\\Program FilesC:\\Program Files\\xampp\\security\\xampp.users


Also these come up relating to the virutalhosts I've created;


[Sun Apr 27 18:10:32 2008] [error] [client 127.0.0.1] client denied by server configuration: C:/Program Files/xampp/apache/htdocs/
[Sun Apr 27 18:10:57 2008] [error] [client 127.0.0.1] client denied by server configuration: C:/Documents and Settings/Ed Barnett/My Documents/Websites/Apress/
edb
 
Posts: 4
Joined: 27. April 2008 11:02

Postby edb » 28. April 2008 21:50

This helped the original error.

<Directory "C:/Documents and Settings/Ed Barnett/My Documents/Websites/apress">
allow from all
</Directory>
edb
 
Posts: 4
Joined: 27. April 2008 11:02


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 98 guests