Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache httpd.conf not listening
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6656
Location: The soundosphere

PostPosted: Fri Apr 01, 2011 10:58 pm    Post subject: Apache httpd.conf not listening Reply with quote

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

Code:

Listen 209.177.157.239:80


and restarted apache. I got

Code:

 * 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

Code:
 * 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.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Fri Apr 01, 2011 11:04 pm    Post subject: Reply with quote

Code:

(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 :)

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:

Code:

Listen 80


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



At any rate, try something like this:

Code:

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.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6656
Location: The soundosphere

PostPosted: Sat Apr 02, 2011 2:11 am    Post subject: Reply with quote

I opened the error log and found

Code:

[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:

Code:

#LoadModule unique_id_module modules/mod_unique_id.so


What is this?
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Sat Apr 02, 2011 4:00 am    Post subject: Reply with quote

audiodef wrote:

Code:

#LoadModule unique_id_module modules/mod_unique_id.so


What is this?


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
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6656
Location: The soundosphere

PostPosted: Sat Apr 02, 2011 3:35 pm    Post subject: Reply with quote

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

I'm glad commenting out that line actually did something good and wasn't a shaky workaround.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum