Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache2 unable to bind to port 80 [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Nomad-71
n00b
n00b


Joined: 07 Aug 2008
Posts: 55
Location: Russia

PostPosted: Tue Nov 18, 2008 12:06 pm    Post subject: Apache2 unable to bind to port 80 [Solved] Reply with quote

When i an trying to start apache i am getting the following message:
Code:
/etc/init.d/apache2 start
 * Starting apache2 ...
apache2: apr_sockaddr_info_get() failed for nomad71st
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 [::]:80  [ ok ]

But netstat says:
Code:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State     
tcp        0      0 *:29703                 *:*                     LISTEN     
tcp        0      0 192.168.1.3:29703       84.204.88.65:2095       SYN_RECV   
tcp        0      0 192.168.1.3:29703       154-99-199-82.iskr:1432 SYN_RECV   
tcp        0      0 192.168.1.3:29703       32-81-113-92.pool:55577 SYN_RECV   
tcp        0      0 192.168.1.3:29703       ip227.dsl-nch.hitv:3934 SYN_RECV   
tcp        0      0 192.168.1.3:29703       ip211-229.telenet.:2384 SYN_RECV   
tcp        0      0 192.168.1.3:29703       211-193-113-92.poo:1437 SYN_RECV   
tcp        0      0 192.168.1.3:29703       NAT-81-25-53-114.u:4741 SYN_RECV   
tcp        0      0 192.168.1.3:29703       37.89.ip.opticoms:55656 SYN_RECV   
tcp        0      0 192.168.1.3:29703       10.1.90.64:tr-rsrb-p3   SYN_RECV   
tcp        0      0 192.168.1.3:29703       mc100.dialup.corbi:4588 SYN_RECV   
tcp        0      0 192.168.1.3:29703       95-24-139-122.bro:61837 SYN_RECV   
tcp        0      0 192.168.1.3:29703       ppp83-237-52-43.pp:4487 SYN_RECV   
tcp        0      0 192.168.1.3:29703       89.113.208.74:56561     SYN_RECV   
tcp        0      0 192.168.1.3:29703       94.253.24.68:58961      SYN_RECV   
tcp        0      0 192.168.1.3:29703       natpool.tesontel.r:2986 SYN_RECV   
tcp        0      0 192.168.1.3:29703       62.85.16.139:4212       SYN_RECV   
tcp        0      0 *:netbios-ssn           *:*                     LISTEN     
tcp        0      0 *:56300                 *:*                     LISTEN     
tcp        0      0 localhost:ipp           *:*                     LISTEN     
tcp        0      0 *:3128                  *:*                     LISTEN     
tcp        0      0 *:microsoft-ds          *:*                     LISTEN     
tcp        0  12132 192.168.1.3:45691       89-179-11-122.bro:10914 ESTABLISHED
tcp        0      1 192.168.1.3:55606       213.231.32.1.pool:34933 LAST_ACK   
tcp        0      1 192.168.1.3:45261       1.35.117.87.donpa:56262 SYN_SENT   
tcp        0  12132 192.168.1.3:38723       78.107.235.60:30623     ESTABLISHED
tcp        0      0 192.168.1.3:44446       77.241.32.229:21546     ESTABLISHED
tcp        0      0 192.168.1.3:43242       cpc3-woki2-0-0-cu:17965 ESTABLISHED
tcp        0      0 192.168.1.3:57686       caim-d05b.blue.aol.:aol ESTABLISHED
tcp      473      0 192.168.1.3:29703       192.168.1.3:45511       CLOSE_WAIT
tcp        0  17784 192.168.1.3:36831       94.51.137.226:46986     ESTABLISHED
tcp        0      0 192.168.1.3:54432       205.188.9.96:aol        ESTABLISHED
tcp        0   8640 192.168.1.3:47018       213.170.115.162:51777   ESTABLISHED
tcp        0  11521 192.168.1.3:59813       92.101.233.230:40104    FIN_WAIT1 
tcp6       0      0 [::]:29703              [::]:*                  LISTEN     
tcp6       0      0 localhost:ipp           [::]:*                  LISTEN     
udp        0      0 *:29703                 *:*                               
udp        0      0 192.168.1.3:netbios-ns  *:*                               
udp        0      0 *:netbios-ns            *:*                               
udp        0      0 192.168.1.3:netbios-dgm *:*                               
udp        0      0 *:netbios-dgm           *:*                               
udp        0      0 localhost:57781         *:*                               
udp        0      0 *:icpv2                 *:*                               
udp        0      0 *:56300                 *:*                               
udp        0      0 *:47724                 *:*                               
udp        0      0 *:6771                  *:*                               
udp        0      0 *:ipp                   *:*                               
udp        0      0 *:35577                 *:*   

There are no programs listening to port 80.
_________________
Live is only memory!


Last edited by Nomad-71 on Tue Nov 18, 2008 6:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
Exil
Apprentice
Apprentice


Joined: 10 Oct 2005
Posts: 251
Location: Nibylandia

PostPosted: Tue Nov 18, 2008 12:19 pm    Post subject: Reply with quote

search for :80 in /etc/apache2

grep -iR :80 *
Back to top
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2397

PostPosted: Tue Nov 18, 2008 1:19 pm    Post subject: Reply with quote

are you maybe running skype on that machine?
afaik this fine piece of software sometimes binds to port 80.
take a look at the options.
Back to top
View user's profile Send private message
Nomad-71
n00b
n00b


Joined: 07 Aug 2008
Posts: 55
Location: Russia

PostPosted: Tue Nov 18, 2008 1:51 pm    Post subject: Reply with quote

Exil wrote:
search for :80 in /etc/apache2

grep -iR :80 *

i execute this and get following:
Code:
vhosts.d/00_default_vhost.conf:#Listen 12.34.56.78:80
vhosts.d/00_default_vhost.conf:NameVirtualHost *:80
vhosts.d/00_default_vhost.conf:<VirtualHost *:80>

and the 00_default_vhost.conf is
Code:

# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

<IfDefine DEFAULT_VHOST>
# see bug #178966 why this is in here

# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

# Use name-based virtual hosting.
NameVirtualHost *:80

# When virtual hosts are enabled, the main host defined in the default
# httpd.conf configuration will go away. We redefine it here so that it is
# still available.
#
# If you disable this vhost by removing -D DEFAULT_VHOST from
# /etc/conf.d/apache2, the first defined virtual host elsewhere will be
# the default.
<VirtualHost *:80>
   ServerName localhost
   Include /etc/apache2/vhosts.d/default_vhost.include
      <IfModule mpm_peruser_module>
      ServerEnvironment apache apache
   </IfModule>
</VirtualHost>
</IfDefine>

And even if i comment them out i cant to connect to my apache server. (As i know there must be a default page with text "It works" or something like that)
_________________
Live is only memory!
Back to top
View user's profile Send private message
nativemad
Developer
Developer


Joined: 30 Aug 2004
Posts: 918
Location: Switzerland

PostPosted: Tue Nov 18, 2008 5:14 pm    Post subject: Reply with quote

I don't know how your netstat is done... but try this:
Code:
netstat -n -l --inet -p | grep :80

Cheers

edit:
I hope you don't heave anything against me... nomad vs nativemad! :wink:
_________________
Power to the people!
Back to top
View user's profile Send private message
Nomad-71
n00b
n00b


Joined: 07 Aug 2008
Posts: 55
Location: Russia

PostPosted: Tue Nov 18, 2008 5:26 pm    Post subject: Reply with quote

nativemad wrote:
I don't know how your netstat is done... but try this:
Code:
netstat -n -l --inet -p | grep :80

Cheers

edit:
I hope you don't heave anything against me... nomad vs nativemad! :wink:

Tryed, and dont got anything.

p.s. No nothing, i just can bite you a bit :D
_________________
Live is only memory!
Back to top
View user's profile Send private message
nativemad
Developer
Developer


Joined: 30 Aug 2004
Posts: 918
Location: Switzerland

PostPosted: Tue Nov 18, 2008 5:43 pm    Post subject: Reply with quote

Hmmm... Then there should be nothing that sits on port 80!?! I also have quite the same in 00_default_vhost.conf....

BUT, is nomad71st in your hosts file? :wink:
_________________
Power to the people!
Back to top
View user's profile Send private message
Nomad-71
n00b
n00b


Joined: 07 Aug 2008
Posts: 55
Location: Russia

PostPosted: Tue Nov 18, 2008 5:58 pm    Post subject: Reply with quote

nativemad wrote:
Hmmm... Then there should be nothing that sits on port 80!?! I also have quite the same in 00_default_vhost.conf....

BUT, is nomad71st in your hosts file? :wink:

/etc/hosts
Code:
127.0.0.1   localhost
::1      localhost

only this
_________________
Live is only memory!
Back to top
View user's profile Send private message
nativemad
Developer
Developer


Joined: 30 Aug 2004
Posts: 918
Location: Switzerland

PostPosted: Tue Nov 18, 2008 6:03 pm    Post subject: Reply with quote

Just place nomad71st behind localhost and you're done! :wink:
_________________
Power to the people!
Back to top
View user's profile Send private message
Nomad-71
n00b
n00b


Joined: 07 Aug 2008
Posts: 55
Location: Russia

PostPosted: Tue Nov 18, 2008 6:15 pm    Post subject: Reply with quote

Now my /etc/hosts looks like this, but still i cant connect -(
Code:
127.0.0.1   localhost nomad71
::1      localhost nomad71

my /etc/apache2/httpd.conf is

Code:
# This is a modification of the default Apache 2.2 configuration file
# for Gentoo Linux.
#
# Support:
#   http://www.gentoo.org/main/en/lists.xml   [mailing lists]
#   http://forums.gentoo.org/                 [web forums]
#   irc://irc.freenode.net#gentoo-apache      [irc chat]
#
# Bug Reports:
#   http://bugs.gentoo.org                    [gentoo related bugs]
#   http://httpd.apache.org/bug_report.html   [apache httpd related bugs]
#
#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "var/log/apache2/foo_log"
# with ServerRoot set to "/usr" will be interpreted by the
# server as "/usr/var/log/apache2/foo.log".

# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to point the LockFile directive
# at a local disk.  If you wish to share the same ServerRoot for multiple
# httpd daemons, you will need to change at least LockFile and PidFile.
ServerRoot "/usr/lib/apache2"
#Listen 80
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
# GENTOO: Automatically defined based on APACHE2_MODULES USE_EXPAND variable.
#         Do not change manually, it will be overwritten on upgrade.
#
# The following modules are considered as the default configuration.
# If you wish to disable one of them, you may have to alter other
# configuration directives.
#
# Change these at your own risk!

LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
<IfDefine CACHE>
LoadModule cache_module modules/mod_cache.so
</IfDefine>
LoadModule cgi_module modules/mod_cgi.so
<IfDefine DAV>
LoadModule dav_module modules/mod_dav.so
</IfDefine>
<IfDefine DAV>
LoadModule dav_fs_module modules/mod_dav_fs.so
</IfDefine>
<IfDefine DAV>
LoadModule dav_lock_module modules/mod_dav_lock.so
</IfDefine>
LoadModule deflate_module modules/mod_deflate.so
LoadModule dir_module modules/mod_dir.so
<IfDefine CACHE>
LoadModule disk_cache_module modules/mod_disk_cache.so
</IfDefine>
LoadModule env_module modules/mod_env.so
LoadModule expires_module modules/mod_expires.so
LoadModule ext_filter_module modules/mod_ext_filter.so
<IfDefine CACHE>
LoadModule file_cache_module modules/mod_file_cache.so
</IfDefine>
LoadModule filter_module modules/mod_filter.so
LoadModule headers_module modules/mod_headers.so
LoadModule include_module modules/mod_include.so
<IfDefine INFO>
LoadModule info_module modules/mod_info.so
</IfDefine>
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
<IfDefine CACHE>
LoadModule mem_cache_module modules/mod_mem_cache.so
</IfDefine>
LoadModule mime_module modules/mod_mime.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule speling_module modules/mod_speling.so
<IfDefine SSL>
LoadModule ssl_module modules/mod_ssl.so
</IfDefine>
<IfDefine STATUS>
LoadModule status_module modules/mod_status.so
</IfDefine>
LoadModule unique_id_module modules/mod_unique_id.so
<IfDefine USERDIR>
LoadModule userdir_module modules/mod_userdir.so
</IfDefine>
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so

# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
User apache
Group apache

# Supplemental configuration
#
# Most of the configuration files in the /etc/apache2/modules.d/ directory can
# be turned on using APACHE2_OPTS in /etc/conf.d/apache2 to add extra features
# or to modify the default configuration of the server.
#
# To know which flag to add to APACHE2_OPTS, look at the first line of the
# the file, which will usually be an <IfDefine OPTION> where OPTION is the
# flag to use.
Include /etc/apache2/modules.d/*.conf

# Virtual-host support
#
# Gentoo has made using virtual-hosts easy. In /etc/apache2/vhosts.d/ we
# include a default vhost (enabled by adding -D DEFAULT_VHOST to
# APACHE2_OPTS in /etc/conf.d/apache2).
Include /etc/apache2/vhosts.d/*.conf

_________________
Live is only memory!
Back to top
View user's profile Send private message
nativemad
Developer
Developer


Joined: 30 Aug 2004
Posts: 918
Location: Switzerland

PostPosted: Tue Nov 18, 2008 6:52 pm    Post subject: Reply with quote

hmmm...
Quote:
127.0.0.1 localhost nomad71

Quote:
apache2: apr_sockaddr_info_get() failed for nomad71st


Whats your hostname?? :wink:

--apache does a dns-request for its hostname.... maybe you also need a line with your real ip, like the 127.0.0.1 one... (really recommended!)
_________________
Power to the people!
Back to top
View user's profile Send private message
Nomad-71
n00b
n00b


Joined: 07 Aug 2008
Posts: 55
Location: Russia

PostPosted: Tue Nov 18, 2008 6:59 pm    Post subject: Reply with quote

nativemad wrote:
hmmm...
Quote:
127.0.0.1 localhost nomad71

Quote:
apache2: apr_sockaddr_info_get() failed for nomad71st


Whats your hostname?? :wink:

--apache does a dns-request for its hostname.... maybe you also need a line with your real ip, like the 127.0.0.1 one... (really recommended!)

Yes, thank you it was my mistake.
Thank you with all my soul!
_________________
Live is only memory!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia 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