# Apache Hair Puller!!!!

## friedmud

What the heck is the deal???  I had apache up and running on my previous install of gentoo - but now it just refuses to work.

Here is what I try:

```

friedmud etc # apachectl start

/usr/sbin/apachectl start: httpd could not be started

```

No errors in the error log- no nothing, it just refuses to start.  I don't have anything else merged (that has to do with apache).  I am just trying to run plain vanilla apache here.  I haven't edited the config file at all.

If anyone has a clue I would really appreciate it!  I need this box to go up NOW!

Thanks!

Derek

EDIT:  Some more info:

I have tried unmerging and remerging.  I have tried starting apache through /usr/sbin/apache (same result).  I have added it to the default runlevel and rebooted (just didn't start).  I have tried EVERYTHING I can think of.

I am running a 1.1a system that is newly installed.

Thanks again!

----------

## ElCondor

 *friedmud wrote:*   

> 
> 
> No errors in the error log- no nothing, it just refuses to start.  I don't have anything else merged (that has to do with apache).  I am just trying to run plain vanilla apache here.  I haven't edited the config file at all.
> 
> 

 

without knowing the rest of your system: generally it helps editing the config file  :Wink:  maybe it's just a path missing. apache is sometimes a little stingy with it's error messages. try at least a 

```
apachectl configtest
```

 to be sure, the config is clean!

hth 

* ElCondor pasa *

----------

## friedmud

Thanks for the reply....

I forgot to mention in my first post that I had tried a configtest -> and it says everything is fine  :Sad: 

I looked through the config file - but everything seems in order.  I am really bummed but I don't have any more time to spend on it today  :Sad: 

If you have any more ideas let me know.

Derek

----------

## ravnx

Possibly there is an old pidfile that didnt get killed ex: "/var/run/apache.pid" <-- that file should NOT exist if apache is not running.

also, you said the logs are clean. you've checked both  "/var/log/apache/error_log" and "/var/log/messages" right? You should at least see something like the following in your "/var/log/apache/error_log"

apachectl start :

[Mon May 13 16:55:02 2002] [notice] Apache/1.3.24 (Unix) configured -- resuming normal operations

[Mon May 13 16:55:02 2002] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

[Mon May 13 16:55:02 2002] [notice] Accept mutex: sysvsem (Default: sysvsem)

apachectl stop :

[Mon May 13 16:55:05 2002] [notice] caught SIGTERM, shutting down[/b]

----------

## friedmud

After fiddling with it for a little while I am finally getting this in my error_log:

[Sat May 11 17:43:30 2002] [alert] mod_unique_id: unable to gethostbyname("friedmud.umr.edu")

It is because friedmud.umr.edu isn't really my hostname - but I really don't have a hostname anyway (just an ip and a really long DHCP assigned "hostname").  I have it set for servername=localhost though so I don't know why it cares.

Anyone have a clue?  Would this actually keep apache from starting??

Thanks again!

Derek

----------

## friedmud

Got it!!!

I just commented out the mod_unique_id stuff and it started right up!  Interesting....

I've never had this problem before - anyone know another way of doing it besides commenting out that module??

Thanks!

Derek

----------

## handsomepete

You might just be able to comment out the ServerName/BindAddress directives.  I've never been entirely sure what ServerName does (sends a name back to the client?  Why would that need to be done (i.e. enter IP returns a name to client maybe?)).  What does the unique_id module do?

----------

## SkuTheSnake

i think that this problem comes with some router etc without a dhcp/dns server. i made some tests 

--> if you give the gentoo a static ip then you get the error like above and you can solve it this way /etc/hosts set an entry like 

192.168.6.3 Gentoo --> ip = ip of your gentoo machine 'gentoo' should be the name of your domain i.e. 'friedmud.umr.edu# like above 

myself used the fli4l router without dhcp but dns and get the same error message. If connectet directly with the inet i didnt get an error   :Shocked: 

the gethostbyname routine couldnt resolv a name in intranet without an dns server (my opinion)   :Smile:  and the router itself resolves only ip´s from the internet but not from my intranet (firewall of port_masq on)

----------

## scarr

Thanks!!!!!!   

This was a hair puller for me as well.  Didn't think to setup the hostname under hosts.  That fixed it.

Thanks again.

----------

