The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 Apache wont start
Author: xavier 
Date:   25-11-00 12:49

I'm running FreeBSD 4.0-RELEASE. I'm running ipfw (firewall) and I installed the latest apache (apache-1.3.14). For some reason, httpd will not start and I can't figure out why. First, I kept getting the following when doing a "apachectl start" command:

[Sat Nov 25 03:28:07 2000] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
/usr/local/sbin/apachectl start: httpd could not be started

Of course doing a "ps ax | grep httpd" shown no running httpd processes. Then when I added my hostname to /etc/hosts for 127.0.0.1 I get this after "apachectl start":

[Sat Nov 25 03:34:18 2000] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
/usr/local/sbin/apachectl start: httpd started

But it didn't start because there are no httpd processes running. Here is a snippet of my /var/log/httpd-error.log:

[Sat Nov 25 01:00:21 2000] [alert] mod_unique_id: unable to gethostbyname("echo.localdomain.com")
[Sat Nov 25 01:17:19 2000] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Sat Nov 25 01:17:19 2000] [crit] (42)Protocol not available: make_sock: for port 80, setsockopt: (SO_ACCEPTFILTER)

Please help...Thanks.

Xavier


Reply To This Message
 
 RE: Apache wont start
Author: Dan Langille 
Date:   25-11-00 23:23

Try apachectl configtest. Fix any errors. Tell us what they are. Then try again.

Is 127.0.0.1 specified in your apache configuration file?

Does your server configuration file contain an entry for ServerName (and which does not appear within a VirtualHost entry)?

if you do "nslookup 127.0.0.1", what do you get?

By default, /etc/hosts specifies 127.0.0.1, so what do you have now?
$ grep 127.0.0.1 /etc/hosts
127.0.0.1 localhost localhost.my.domain myname.my.domain

Is "hosts" still specified within /etc/host.conf? Is it before or after "bind"? Does moving it affect the problem?


Reply To This Message
 
 RE: Apache wont start
Author: xavier 
Date:   26-11-00 12:54

Thanks Dan, for the suggestions. I decided to update my system to 4.2-RELEASE and after "make world" and compiling the kernel, apache mysteriously began to work. I didn't make a single change to the configuration. So everything seems to be working fine now. Thanks again.

Xavier

Reply To This Message
 
 RE: Apache wont start
Author: el_kab0ng 
Date:   27-11-00 18:39

I recently installed 4.1.1 RELEASE and got the same error. It seems if you comment out the mod_unique_id sections, apache will start fine. It's because it can't reverse your hostname that the error occurs. If you are like me and plan to have local access to the webserver only, then you wouldn't need those modules anyway.

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org