Apache refuses to start (due to Parallels?) and virtual hosts problem

Dan Shoop shoop at iwiring.net
Thu Nov 8 12:00:19 PST 2007


On Nov 8, 2007, at 1:22 PM, Markus Ruggiero wrote:

> I have a weird problem with Apache2, virtual hosts, Leopard and  
> Parallel (and maybe other things)
>
> Environment: Leopard, upgraded from Tiger with option "Archive and  
> Install, transfer user and network settings" on MacBook Pro with 4G  
> of RAM
>
> After reboot of Leopard I can do http://localhost and everything  
> works. However the upgrade process did not reestablish the virtual  
> host config I had on Tiger.

If you are hosting sites with OS X, not OS X Server, then it doesn't  
handle virtual hosts at all, just personal web hosting, so this is  
the expected behavior.

> OK, no problem, I added the hosts to /etc/hosts

They should be in DNS.

> and enabled virtual hosts in /etc/apache2/httpd.config and /etc/ 
> apache2/extras/httpd-vhosts.config). Unfortunately none of my hosts  
> are found.

Meaning?

What does apachectl report?

> However I can prove that the config files are read because the  
> first virtual host has a directory that lies outside of the  
> default /Library/WebServer/Documents - and these files are being  
> served. No matter what hostname I enter in Safari, it is always  
> that first-in-the-file host that is serving.

Which indicates that there is a problem with your configuration.

If Apache can not determine the correct virtual host it always  
defaults to the default host for that IP address or mapping that it  
can follow.


> This is clearly an indication that Apache does not find a virtual  
> host corresponding to the used host name.

No it is not.


You should note that there are significant differences betweeen  
Apache 1.3 and Apache 2.x and that you should not exepct the config  
files from the former to work cleanly with the latter.



> No problem, must be some typo so I started playing with the vhosts  
> file and restarting Apache (both with the Sharing Prefs pane as  
> well als from the commandline with apachectl). Now in the  
> System.log I see weird entries for each restart that  some Key to  
> lanch demon is not known (see below). I had to interrupt my trying  
> to do some "real" work. Therefore I booted up WindowsXP within  
> Parallels (network set to direct connect mode to ethernet adaptor).  
> Later I came back to Apache and all of a sudden Apache refused to  
> start at all (again see copy from log further down). Shuting down  
> Parallels does not help, only a reboot cleared things. Apache  
> starts and restarts somewhat cleanly but again refuses to start  
> after Parallels has run. Oh, and I still don't know why my virtual  
> hosts don't work.
> Anyone knows what is going on here? How can I debug the Apache  
> startup failure? What is launch demon complaining about? And how  
> can I debug virtual hosts?
>
> Here is one set of log entries for an Apache startup. The only  
> difference between a start and a failed start are the two lines at  
> the end.
>
> Nov  8 08:42:21 vmtellswin1 kernel[0]: IOMemoryDescriptor: attempt  
> to create 32b virtual in 64b task, use ::withAddressRange()
> Nov  8 08:42:21 vmtellswin1 kernel[0]: Backtrace 0x426b0b 0x4269fb  
> 0x426446 0x6d4b2a 0x6d6ea1 0x6d75c3 0x6d8129
> Nov  8 08:42:21 vmtellswin1 kernel[0]: Kernel loadable modules in  
> backtrace (with dependencies):
> Nov  8 08:42:21 vmtellswin1 kernel[0]: at.obdev.nke.LittleSnitch 
> (2.0.21)@0x6d1000->0x6f1fff
> Nov  8 08:42:21 vmtellswin1 kernel[0]: m7e0f6384m0ca6b462 -536870211
> Nov  8 08:42:21 vmtellswin1 kernel[0]: m15b71329 -536870211
> Nov  8 08:42:21 vmtellswin1 com.apple.launchd[1] (org.apache.httpd 
> [624]): Exited with exit code: 1
> Nov  8 08:42:21 vmtellswin1 com.apple.launchd[1]  
> (org.apache.httpd): Throttling respawn: Will start in 10 seconds

Apache is misconfigured and won't start.

-dhan

------------------------------------------------------------------------
Dan Shoop
Computer Scientist
iWiring / U.S. Technical Services

shoop at iwiring.net
AOL IM .................... iWiring
Nextel .................... 1-714-363-1174
Operations TOC (24/7) ..... 1-866-901-USTS
USTS Offices .............. 1-714-374-6300

For immediate response for urgent matters please speak to the Duty  
Officer
at the USTS Tactical Operations Center (above) who can reach me by  
radio.




More information about the MacOSX-admin mailing list