Server dies when virtual hosts are specified

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

Server dies when virtual hosts are specified

Postby bborun » 06. October 2006 14:15

I am trying to run up four virtual hosts on a customer's WinXPSP2 box. Everything is fine until I specify a virtual host - even the default vhost.

When I start Apache it dies within 1-2 seconds. There is no error log entry only an entry in the Event Viewer->System, which tells me that the
Apache service died with an service specific error code of 1 (0x1).

I have search the forum for an answer, to this problem without success. Can someone please shed some light on my problem, one way or another?
User avatar
bborun
 
Posts: 5
Joined: 06. October 2006 10:27
Location: Sydney, Australia

Postby Wiedmann » 06. October 2006 14:21

only an entry in the Event Viewer->System,

Look into "Event Viewer->Application".
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby bborun » 06. October 2006 16:21

Look into "Event Viewer->Application".


There is no event logged against the Apache2 application. The only message logged is in the System log and it reads:

The Apache2 service terminated with service-specific error 1 (0x1).
User avatar
bborun
 
Posts: 5
Joined: 06. October 2006 10:27
Location: Sydney, Australia

Postby Wiedmann » 06. October 2006 17:19

Then start Apache with the batchfile ("apache_start.bat").
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby bborun » 06. October 2006 18:54

apache_start.bat just quits:

C:\Program Files\xampp>.\apache_start.bat
Diese Eingabeforderung nicht waehrend des Running beenden
Bitte erst bei einem gewollten Shutdown schliessen
Please close this command only for Shutdown
Apache 2 is starting ...

Apache konnte nicht gestartet werden
Apache could not be started
Press any key to continue . . .
User avatar
bborun
 
Posts: 5
Joined: 06. October 2006 10:27
Location: Sydney, Australia

Postby Izzy » 06. October 2006 23:26

Normally when you run xampp-start.bat it would give you any errors it found when trying to start, like this:
Code: Select all
Diese Eingabeforderung nicht waehrend des Running beenden
Bitte erst bei einem gewollten Shutdown schliessen
Please close this command only for Shutdown
Apache 2 is starting ...
apache.exe: Syntax error on line 501 of C:/xampp/apache/conf/httpd.conf: Syntax error on line 63 of C:/xampp/apache/conf
/extra/httpd-vhosts.conf: Expected </Directory"> but saw </Directory>

Apache konnte nicht gestartet werden
Apache could not be started
Press any key to continue . . .

I purposely added a " to the <Directory> directive to simulate an error message for you.

Another method to check your xampp\apache\conf\extra\httpd-vhosts.conf configuration is correct is to issue the apache -S command at a dos console in xampp\apache\bin and to check the xampp\apache\conf\httpd.conf has correct syntax issue the command apache -t in the same way.

The returned messages might give some clues for you.

If you are not sure what they mean you are most welcome to paste them here so they can be analysed.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby bborun » 06. October 2006 23:56

Izzy,

Thanks for the help. I followed your Instructions, and the following is the output:

C:\Program Files\xampp\apache\bin>.\apache -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
_default_:443 localhost (C:/Program Files/xampp/apache/conf/extra/httpd
-ssl.conf:74)
*:80 is a NameVirtualHost
default server www.newenglandcoating.net (C:/Program Files/xampp/apache
/conf/extra/httpd-vhosts.conf:36)
port 80 namevhost www.newenglandcoating.net (C:/Program Files/xampp/apa
che/conf/extra/httpd-vhosts.conf:36)
Syntax OK

C:\Program Files\xampp\apache\bin>.\apache -t
Syntax OK

C:\Program Files\xampp\apache\bin>

User avatar
bborun
 
Posts: 5
Joined: 06. October 2006 10:27
Location: Sydney, Australia

Postby Izzy » 07. October 2006 00:10

Those look fine so your problems are not with virtual hosts nor is it a httpd.conf issue. So you have to investigate taking a new approach.

You don't have another server trying to use port 80 - xampp-portcheck.exe should give all ports as being free.

If all else fails then it might be a corrupt installation somehow. So if you uninstall by deleting the whole XAMPP directory you installed to. Then after a PC reboot (not required but often helps) reinstall XAMPP.

I had some issues with the installer version once upon a time and changed my install method to the 7Zip version and had a perfect install and upgrade each time. Also you have more control over where you can install to, as opposed to the installer method.

Sorry I can't be more help but without an error message to work with it is very difficult to try and fathom it all out remotely.

Good luck.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby bborun » 07. October 2006 00:26

The port check was fine. I also tried to activate virtual hosting on my own development box running WinXP SP2 and it failed in exactly the same way.

I normally run apache under FreeBSD. This is the first time I have been asked to run up a WinXP based apache server supporting virtual hosts and the lack of joy is definitely disconcerting. I will try your suggestion regarding a zip installation.

Thanks again for the help, guys.
User avatar
bborun
 
Posts: 5
Joined: 06. October 2006 10:27
Location: Sydney, Australia

Postby Wiedmann » 07. October 2006 14:36

Code: Select all
Apache 2 is starting ...

Apache konnte nicht gestartet werden

You have defined a wrong ErrorLog?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Izzy » 07. October 2006 23:51

If you have defined an error log incorrectly in your virtual hosts container then you should see an error similar to this in the file:
xampp\apache\logs\error.log
Code: Select all
[date of event] [crit] (22)Invalid argument: unable to replace stderr with error_log
[date of event] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 116 guests