# Apache httpd.conf not listening

## audiodef

Or maybe I missed something. 

I just set up an account with vr.org. I'm using a Gentoo image. I emerged apache, php and mysql. Started apache and mysql. I added to httpd.conf

```

Listen 209.177.157.239:80

```

and restarted apache. I got

```

 * Starting apache2 ...

apache2: apr_sockaddr_info_get() failed for serverdef

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

(98)Address already in use: make_sock: could not bind to address 209.177.157.239:80

no listening sockets available, shutting down

Unable to open logs

```

Without the Listen line, I get

```
 * Starting apache2 ...

apache2: apr_sockaddr_info_get() failed for serverdef

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

```

Of course, unable to reach http://209.177.157.239. Not sure what I missed. I'm used to running LAMP at home on my home network (all I need is localhost or my home server's router-assigned IP address), so this is a little new for me.

----------

## cach0rr0

```

(98)Address already in use: make_sock: could not bind to address 209.177.157.239:80

```

this one's going to kill things off nicely  :Smile: 

do you have a specific need for Apache to only listen on that one IP? Or is it fine if it listens on all IP's on 80? 

Also, you have Listen on publicip:80, but ServerName is defaulting to localhost

If you don't have a specific need to bind Apache only to that IP address:

```

Listen 80

```

in /etc/apache2/vhosts.d/00_default_vhost.conf

At any rate, try something like this:

```

ServerName bauer.whitehathouston.com

```

in /etc/apache2/modules.d/00_default_settings.conf

Then shut down Apache, and check netstat -anp, make sure nothing *else* is listening on 80

If something else has it occupied, there's your problem

If not, go ahead and try to start up Apache.

----------

## audiodef

I opened the error log and found

```

[Fri Apr 01 12:09:19 2011] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/1.0.0d configured -- resuming normal operations

```

I did some searching and found some suggestions to disabling modules that are not needed. I noticed that apache started and I'm now able to access my server's IP address in a browser by commenting out the following line in httpd.conf:

```

#LoadModule unique_id_module modules/mod_unique_id.so

```

What is this?

----------

## cach0rr0

 *audiodef wrote:*   

> 
> 
> ```
> 
> #LoadModule unique_id_module modules/mod_unique_id.so
> ...

 

the fix, actually, in lieu of setting a ServerName directive

I can't believe I forgot about that, that mod_unique_id shit has been around for ages. 

don't need it, but again setting your ServerName directive should also get past the issue

----------

## audiodef

I won't hold forgetfulness against you, especially when I can't remember what I wore yesterday.   :Razz: 

I'm glad commenting out that line actually did something good and wasn't a shaky workaround.

----------

