# starting apache

## michael

I just got gentoo installed, but i am having trouble with its daemon control scripts.  I am trying to start apache with no luck.  when i run " /etc/init.d/apache start"   it fails with no error message.  When i try to run apachectl start it fails as well.  Is there anythink special i have to do in gentoo to get this working ?  I can't get dhcp to start up either.  samba seems to start up fine tho.

-thanks,

michael  :Confused: 

----------

## lude

 *michael wrote:*   

> ...it fails with no error message.  When i try to run apachectl start it fails as well.

 

It should at least drop something in /var/log/apache/error_log

See if there's anything relevant in there, if you're not sure, paste it.

----------

## mfairchi

good advice.  there were some messages in the log.  

[Mon Apr 22 23:16:38 2002] [alert] mod_unique_id: unable to gethostbyname("harbinge")

Which reminded me that i had changed the config file, uncommenting the "ServerName" line and adding the name of my machine.  (this is the only modification i made to apache.conf)  I tried commenting it out again, and got 

apache: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

and apache fails to start.

-michael[/quote]

----------

## lude

 *mfairchi wrote:*   

> I tried commenting it out again, and got 
> 
> apache: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

 

That's bad practice. Could break some things. If you don't have a real FQDN or at least an alias for your machine, put your machine's internet IP for ServerName.

----------

## daos

I remember I solved the problem by modifying a line in (hosts, or hostname or resolv.conf, I don't remember exactly):

127.0.0.1 localhost.localdomain localhost

----------

## Guest

sure enough, the file needing work was hosts.  Thanks

As for the bad practice of commenting out the ServerName, that is how it came from Gentoo.

-thanks for the help  :Smile: 

-michael

----------

## lude

 *Anonymous wrote:*   

> As for the bad practice of commenting out the ServerName, that is how it came from Gentoo.

 

Commenting out is fine, That will tell Apache to look at /etc/hostname for the host name. I'm talking about setting server name to 127.0.0.1   :Confused: 

----------

