Output from apache2 restart:

 * Restarting web server apache2                                                [Thu Feb     09 01:19:34 2012] [warn] NameVirtualHost xx.xx.xxx.xxx:80 has no VirtualHosts
[Thu Feb 09 01:19:34 2012] [warn] NameVirtualHost *:0 has no VirtualHosts
[Thu Feb 09 01:19:34 2012] [warn] NameVirtualHost *:0 has no VirtualHosts
[Thu Feb 09 01:19:34 2012] [warn] NameVirtualHost xx.Xx.xxx.xxx:80 has no VirtualHosts
[Thu Feb 09 01:19:34 2012] [warn] NameVirtualHost *:0 has no VirtualHosts
[Thu Feb 09 01:19:34 2012] [warn] NameVirtualHost *:0 has no VirtualHosts
                                                                     [fail]

Contents of httpd.conf file:

NameVirtualHost *

<VirtualHost *>
ServerName www.xxxx.net
DocumentRoot /srv/www/xxxx.net/public_html/
</VirtualHost>


<VirtualHost *>
ServerName www.xxxx.com
DocumentRoot /srv/www/xxxx.com/public_html/
</VirtualHost>

EDIT: making changes suggested by kaji,

output from apache2 restart

* Restarting web server apache2                                                        Warning: DocumentRoot [/www/rmusser.net] does not exist
[Thu Feb 09 01:41:03 2012] [error] VirtualHost *:8090 -- mixing * ports and non-* ports     with a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Feb 09 01:41:03 2012] [error] VirtualHost *:80 -- mixing * ports and non-* ports with     a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Feb 09 01:41:03 2012] [warn] NameVirtualHost 71.19.144.240:80 has no VirtualHosts
[Thu Feb 09 01:41:03 2012] [warn] NameVirtualHost *:0 has no VirtualHosts
[Thu Feb 09 01:41:03 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
Warning: DocumentRoot [/www/rmusser.net] does not exist
[Thu Feb 09 01:41:03 2012] [error] VirtualHost *:8090 -- mixing * ports and non-* ports     with a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Feb 09 01:41:03 2012] [error] VirtualHost *:80 -- mixing * ports and non-* ports with     a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Feb 09 01:41:03 2012] [warn] NameVirtualHost 71.19.144.240:80 has no VirtualHosts
[Thu Feb 09 01:41:03 2012] [warn] NameVirtualHost *:0 has no VirtualHosts
[Thu Feb 09 01:41:03 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address [::]:80
                                                                         [fail]
link|improve this question
You have other config in place. Based on your tags, you're using Ubuntu - your NameVirtualHost should be in /etc/apache2/ports.conf and your other <VirtualHost> blocks are in files in /etc/apache2/sites-available. – Shane Madden Feb 9 at 2:20
feedback

1 Answer

You have not specified port in virtual host defination

Try this

# Ensure that Apache listens on port 80
Listen 80

# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /www
ServerName www.example1.com

# Other directives here

</VirtualHost>

<VirtualHost *:8090>
DocumentRoot /www/folder
ServerName www.example2.org

# Other directives here

</VirtualHost>
link|improve this answer
Didn't work, look at my edit. – robert Feb 9 at 2:34
Check the comment on your post from @Shane Madden – kaji Feb 9 at 10:36
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.