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.

I'm configuring development & test FreeBSD machine on VM. I installed apache22 package and restarted. But the daemon does not started with this error:

%apachectl start
httpd: apr_sockaddr_info_get() failed for test.box
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
%

My hostname is test.box. Because this is temporary test box, it has no real domain-name. But I used 2-level name to avoid long time waiting of sshd on booting.

However, I searched web, and I modified /etc/hosts file like this (I didn't touches this file before):

# This is original configuration
#::1                    localhost localhost.my.domain
#127.0.0.1              localhost localhost.my.domain

# New configuration    
::1                     localhost test.box
127.0.0.1               localhost test.box
127.0.0.1               test.box test

Now apache fails with this error message:

%apachectl start
httpd: Could not reliably determine the server's fully qualified domain name, using test.box for ServerName
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
%

I don't know what's required now. Please let me know reason and solution of this error.

---- (edit) ----

The permission errors are caused from omission of sudo.

share|improve this question

2 Answers 2

up vote 1 down vote accepted
httpd: Could not reliably determine the server's fully qualified domain name, using test.box for ServerName

Usually, this is just a warning and not a fatal error. It can be solved by adding the config to your apache2.conf file.

ServerName yourserver.yourdomain.com

I can see there is a permission denied error. Make sure you invoke the startup scripts as super user root. Also, make sure there is no other process already listening on apache port (default 80).

share|improve this answer
    
Oh I'm shame on forgetting sudo. –  Eonil Feb 27 '11 at 7:15

I got found a solution. /etc/hosts file configuration was bad. This is right configuration.

# This is original configuration
#::1                    localhost localhost.my.domain
#127.0.0.1              localhost localhost.my.domain

::1                     localhost.test.box localhost
127.0.0.1               localhost.test.box localhost
127.0.0.1               test.box test
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.