views:

2231

answers:

4

I'm running WAMP v2.0 on WindowsXP and I've got a bunch of virtual hosts setup in the http-vhosts.conf file.

This was working, but in the last week whenever I try & start WAMP I get this error in the event logs:

VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results.

and the server won't start. I can't think of what's changed.

I've copied the conf file below.

NameVirtualHost *
<VirtualHost *:80>
    ServerName dev.blog.slaven.net.au
    ServerAlias dev.blog.slaven.net.au
    ServerAdmin [email protected]
    DocumentRoot "c:/Project Data/OtherProjects/slaven.net.au/blog/" 
    ErrorLog "logs/blog.slaven.localhost-error.log"
    CustomLog "logs/blog.slaven.localhost-access.log" common

    <Directory "c:/Project Data/OtherProjects/slaven.net.au/blog/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
            Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

EDIT: I meant to add, if I change the NameVirtualHosts directive to specify a port, i.e

NameVirtualHost *:80

I get this error:

Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80

A: 

Well, it seems the problem there is the way (and order) in which you assign the ports.

Basically, *:80 means "use port 80 for all hosts in this configuration". When you do this, Apache tries to bind that host to 0.0.0.0:80, which means that host will receive every single packet coming to the machine through port 80, regardless of what virtual host it was intended to go to. That's something you should use only once, and only if you have one host in that configuration.

Thus, if you have the same *:80 directive on two hosts in the configuration file, the server won't load because it will try to bind 0.0.0.0:80 twice, failing on the second try. (which explains the "Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80" message).

dguaraglia
+1  A: 

NameVirtualHost *:80

I get this error:

Only one usage of each socket address (protocol/network address/port) is normally >permitted. : make_sock: could not bind to address 0.0.0.0:80

I think this might be because you have somthing else listening to port 80. Do you have any other servers (or for example Skype) running?

(If it was Skype: untick "Tools > Options > Advanced > Connection > Use port 80 and 443 as alternatives for incoming connections")

nohj
A: 

It wasn't Skype, but it was Jungle Disk. I wasn't even looking for that because WAMP was reporting that port 80 was available. But on your suggestion, I just shut everything else down & restarted WAMP & it worked. Start everything back up one by one & it dies after Jungle Disk starts up. I had a hunt around & this forum post seems to suggest that it has something to do with Jungle Disks usage of Webdav. Of well, it's working now, just need to start WAMP before Jungle Disk.

Glenn Slaven
A: 

Yeap, that was Skype in my case. Thank you!