Click to See Complete Forum and Search --> : 2 nics and a web server


gjansky
12-13-2000, 12:39 AM
This is probably has a real easy answer, but it has been driving me nuts for the last two days.....

I have a static IP, say: XXX.XXX.XX.XX and my lan IP, 192.168.0.2 on my web server. I want Apache to answer web requests on the XXX.XXX.XX.XX address. Do I change httpd.conf in the section marked BindAddress? I tried BindAddress XXX.XXX.XX.XX:80, but then I checked the Apache book (O'Rieley) and they suggested Listen. Which is preferable, if it is correct? Or, is there another way?

Thanks.

Greg

SKoL
12-13-2000, 02:04 AM
I just use listen..

# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
#Listen 3000
Listen xxx.xxx.xxx.xxx:80

Sweede
12-13-2000, 03:04 AM
apache binds to all addresses by default.
if you specify a listen 3.2.5.2

it will NOT listen to localhost.

gjansky
12-16-2000, 04:57 PM
I thank you both, sorry I didn't respond earlier....my wife and I just gave birth.

Originally, http.conf had BindAddress *

Should I have left this?

Greg

SKoL
12-16-2000, 05:33 PM
Yeah, just un-comment it and put the ip that you want apache to listen on.

gjansky
12-16-2000, 06:09 PM
Ahhhhh...that makes sense.

Thanks for the info.

Greg

SKoL
12-16-2000, 06:18 PM
NP http://www.linuxnewbie.org/ubb/smile.gif

gjansky
01-03-2001, 12:25 AM
SKoL,
I uncommented the BindAddress directive and addeded my external interface to the Listen directive. When I test the server from another (internet address) I get a "server not responding" error message.

Does this problem sound minor?

Greg

mdwatts
01-03-2001, 07:37 AM
Congratulations on the new addition. Hope all are well.

SKoL
01-03-2001, 09:32 AM
Originally posted by gjansky:
SKoL,
I uncommented the BindAddress directive and addeded my external interface to the Listen directive. When I test the server from another (internet address) I get a "server not responding" error message.

Does this problem sound minor?

Greg

Did you restart Apache after modifying the .conf?

gjansky
01-03-2001, 08:48 PM
Yep, I restarted it a couple of times. Still no luck. How heavily does httpd rely on dns, specifically named?