Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Output when trying "apache2 restart"

* Restarting web server apache2                                                
[Thu Feb   09 00:55:09 2012] [warn] NameVirtualHost 71.19.144.240:80 has no VirtualHosts
[Thu Feb 09 00:55:09 2012] [warn] NameVirtualHost *:0 has no VirtualHosts
[Thu Feb 09 00:55:09 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
[Thu Feb 09 00:55:09 2012] [warn] NameVirtualHost xxx.xxx.xxx:80 has no VirtualHosts
[Thu Feb 09 00:55:09 2012] [warn] NameVirtualHost *:0 has no VirtualHosts
[Thu Feb 09 00:55:09 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address [::]:80
                                                                     [fail]

httpd.conf file: GNU nano 2.2.2 File: httpd.conf

Listen 80
NameVirtualHost *:80

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


<VirtualHost *>
ServerName www.xxxxx.com
DocumentRoot /srv/www/xxxxxx.com/public_html/
</VirtualHost>
share|improve this question

migrated from stackoverflow.com Feb 9 '12 at 7:18

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 0 down vote accepted
Address already in use: make_sock: could not bind to address [::]:80

This means something is already running under port 80. I am guessing you are using

/etc/init.d/apache2 restart

to try to restart the server. Try stopping the service first just to debug.

Again from ubuntu distribution perspective:

NameVirtualHost *:80
Listen 80

should go under

/etc/apache2/ports.conf

and virtual host configuration options

<VirtualHost *:80>
ServerName www.xxxxx.com
DocumentRoot /srv/www/xxxxxx.com/public_html/
</VirtualHost>

should go under a distinct file under /etc/apache2/sites-available which is later on symlinked to /etc/apache2/sites-enabled so that apache sees if in apache's default ubuntu configuration.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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