I have a couple of websites, each in its own directory on my D drive. I want to make a subdomain for each site.

I modified httpd.conf accordingly, but now Apache doesn't start anymore.

The error message (OS 10048) is: "only one usage of each socket address is permitted" "make_sock: could not bind to address 0.0.0.0.0:80 no listening sockets available"

OS is Windows, I edited httpd.conf so that in includes now the following lines:

DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
Listen 80
ServerName localhost
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot "D:/sites/site1/"
ServerName site1.localhost
DirectoryIndex index.php index.html index.htm

<Directory "D:/sites/site1/">
Options Indexes Includes FollowSymLinks
AllowOverride None
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>


<VirtualHost *:80>
DocumentRoot "D:/sites/site2/"
ServerName site2.localhost
DirectoryIndex index.php index.html index.htm

<Directory "D:/sites/site2/">
Options Indexes Includes FollowSymLinks
AllowOverride None
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>



I added the subdomains in the HOST file in System32, which now contains:
127.0.0.1 localhost
127.0.0.1 site1.localhost
127.0.0.1 site2.localhost



I don't understand why the server doesn't start in the first place...
Any clues?