Page 1 of 1

Apache fails to start with Virtual Hosts

PostPosted: 09. December 2007 00:36
by gambler
Hey all!

I have been having trouble with Xampp and VirtualHosts.

Whenever I add a virtual host, other than localhost, apache refuses to start and stalls on "Apache Started [Port 80]" but the "Running" box never pops up and I cannot access my local site.

Gibberish:

Code: Select all
Firefox can't establish a connection to the server at localhost.


There are no entries in the apache error log or access log for any dates after I started having this problem.

Please help!
-Gambler

PostPosted: 09. December 2007 01:04
by Izzy
We can only imagine what your httpd-vhost.conf file looks like or even what the results are after typing apache -S at the prompt in a command console inside the xampp\apache\bin directory.


===========================================
1. The new DeskTopXampp Launch Control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Build Rich AJAX Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================

PostPosted: 09. December 2007 01:18
by gambler
I thought everyone had an amazing imagination!

Here is the offending code:


httpd-vhost.conf
Code: Select all
NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
  DocumentRoot C:/xampp/htdocs/
  ServerName localhost
</VirtualHost>

<VirtualHost 127.0.0.1:80>
   DocumentRoot C:/Users/James/WebProjects/Tennis/webroot/
   ServerName tennis.local
   ErrorLog C:/Users/James/WebProjects/Tennis/logs/tennis_error_log
   CustomLog C:/Users/James/WebProjects/Tennis/logs/tennis_access_log common
</VirtualHost>


And the quote from my good friend apache.exe -S
Code: Select all
C:\xampp\apache\bin>apache.exe -S
Syntax error on line 55 of C:/xampp/apache/conf/extra/httpd-vhosts.conf: CustomLog takes two or three arguments, a file name, a custom log format string or format name, and an optional "env=" clause (see docs)
(That was retyped, so ignore obvious typos).