From owner-freebsd-questions Wed Sep 6 18:34:24 2000 Delivered-To: freebsd-questions@freebsd.org Received: from hotmail.com (f149.law8.hotmail.com [216.33.241.149]) by hub.freebsd.org (Postfix) with ESMTP id 26E1037B423 for ; Wed, 6 Sep 2000 18:34:21 -0700 (PDT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 6 Sep 2000 18:34:20 -0700 Received: from 63.207.125.156 by lw8fd.law8.hotmail.msn.com with HTTP; Thu, 07 Sep 2000 01:34:20 GMT X-Originating-IP: [63.207.125.156] From: "Terje Oseberg" To: matt@gsicomp.on.ca Cc: freebsd-questions@FreeBSD.ORG Subject: Re: FreeBSD 4.0 Firewall System and Problem with Apache Name Virtual Hosts Date: Thu, 07 Sep 2000 01:34:20 GMT Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 07 Sep 2000 01:34:20.0981 (UTC) FILETIME=[BEE7E650:01C0186B] Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > If I'm on the system under test and I telnet to localhost port 80 > > and do the GET requests, it doesn't work, but when I telnet to port > > 80 from another computer, it does work. This is on FreeBSD 3.2 that > > I noticed this and with this particular config file and the original > > config file that I had on that system. > > > > I'm thinking that when I telnet to localhost, it telnet's to the > > wrong (internal rather than external) IP adress. And maybe the bug > > in FreeBSD 4.0 is that when you telnet from outside the firewall > > to port 80, it actually believes that you're inside the firewall. > >If you telnet to port 80 on the local system, the request is coming from >inside the firewall. Hence, it's going to use the web servers NAT'd >address >or 127.0.0.1. Requests from other systems on the NAT'd network will >connect >to the NAT'd address of the web server. The only time when the external >address will be used is when the requests come from outside the >NAT/firewall. > >-- >Matthew Emmerton >GSI Computer Services >+1 (800) 217-5409 (Canada) Hey, sorry about that, I should've thought of that. But, I solved my Apache and FreeBSD 4.0 problem by adding the following lines to the end of my httpd.conf file. So, at this point, I believe that my theory was correct even though I made an obvious error in my reasoning above. Here's what I added. ############################################################# NameVirtualHost 192.168.1.1 ServerName www.etiam.net DocumentRoot /data/web/www.etiam.net ServerName www.alluent.com DocumentRoot /data/web/www.alluent.com ServerName www.fineworks.com DocumentRoot /data/web/www.fineworks.com ServerName www.globalgastrohospital.com DocumentRoot /data/web/www.globalgastrohospital.com ######################################################## I also had to add a line to my /etc/hosts file. My hosts file now contains: 216.15.83.94 alpha.etiam.net alpha etiam.net 192.168.1.1 me.etiam.net (Without the me.etiam.net thing Apache was trying to do a reverse DNS on 192.168.1.1 or something that was making it take forever to start up) _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message