Skip site navigation (1)Skip section navigation (2)
Date:      3 Nov 2001 20:26:57 -0000
From:      "Martin Gignac  FreeBSD " <freebsd@mobilitylab.net>
To:        freebsd-questions@freebsd.org
Subject:   Apache not binding to single address...
Message-ID:  <20011103202657.38808.qmail@mail.mobilitylab.net>

next in thread | raw e-mail | index | archive | help
Hi,

I'm running apache+mod_ssl-1.3.20+2.8.4 on a FreeBSD 4.4-STABLE system 
and I'm having a hard time binding the httpd server to a single IP 
address. I currently have many virtual IP addresses assigned to a 
single Ethernet card.

===== output of ifconfig -a =====
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 172.20.2.2 netmask 0xffffff00 broadcast 172.20.2.255
        inet6 fe80::2b0:d0ff:feb0:ae98%fxp0 prefixlen 64 scopeid 0x1
        inet 172.20.2.3 netmask 0xffffffff broadcast 172.20.2.3
        inet 172.20.2.4 netmask 0xffffffff broadcast 172.20.2.4
        inet 172.20.2.5 netmask 0xffffffff broadcast 172.20.2.5
        inet 172.20.2.100 netmask 0xffffffff broadcast 172.20.2.100
        inet 172.20.2.101 netmask 0xffffffff broadcast 172.20.2.101
        inet 172.20.2.102 netmask 0xffffffff broadcast 172.20.2.102
        inet 172.20.2.103 netmask 0xffffffff broadcast 172.20.2.103
        inet 172.20.2.104 netmask 0xffffffff broadcast 172.20.2.104
        inet 172.20.2.105 netmask 0xffffffff broadcast 172.20.2.105
        inet 172.20.2.106 netmask 0xffffffff broadcast 172.20.2.106
        inet 172.20.2.107 netmask 0xffffffff broadcast 172.20.2.107
        inet 172.20.2.108 netmask 0xffffffff broadcast 172.20.2.108
        inet 172.20.2.109 netmask 0xffffffff broadcast 172.20.2.109
        inet 172.20.2.110 netmask 0xffffffff broadcast 172.20.2.110
        ether 00:b0:d0:b0:ae:98
        media: Ethernet autoselect (10baseT/UTP)
        status: active
===== output of ifconfig -a =====

I've tried putting the following setting in my httpd.conf file:

===== httpd.conf =====
# BindAddress: You can support virtual hosts with this option. This 
directive
# is used to tell the server which IP address to listen to. It can 
either
# contain "*", an IP address, or a fully qualified Internet domain name.
# See also the <VirtualHost> and Listen directives.
#
BindAddress 172.20.2.2
===== httpd.conf =====

I've restarted the server, but after I do a netstat or a sockstat, it 
still shows up as listening on all addresses:

===== sockstat =====
su-2.05# sockstat | grep 80
nobody   httpd    38718   17 tcp4   *:80                  *:*
nobody   httpd    38716   17 tcp4   *:80                  *:*
nobody   httpd    35717   17 tcp4   *:80                  *:*
nobody   httpd    35716   17 tcp4   *:80                  *:*
nobody   httpd    35715   17 tcp4   *:80                  *:*
nobody   httpd    35714   17 tcp4   *:80                  *:*
nobody   httpd    35713   17 tcp4   *:80                  *:*
root     httpd    35712   17 tcp4   *:80                  *:*
===== sockstat =====

I can't spot what I'm doing wrong at this point. Does anybody have any 
clue?

Thanks,
-Martin




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011103202657.38808.qmail>