From owner-freebsd-questions Mon Jun 18 0:29:40 2001 Delivered-To: freebsd-questions@freebsd.org Received: from scaup.mail.pas.earthlink.net (scaup.mail.pas.earthlink.net [207.217.121.49]) by hub.freebsd.org (Postfix) with ESMTP id 778C537B407 for ; Mon, 18 Jun 2001 00:29:32 -0700 (PDT) (envelope-from smaycock@earthlink.net) Received: from barney.home.mrhagar.com (cpe-24-221-103-14.az.sprintbbd.net [24.221.103.14]) by scaup.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with SMTP id AAA13174 for ; Mon, 18 Jun 2001 00:29:29 -0700 (PDT) From: Simon Maycock Date: Mon, 18 Jun 2001 07:28:36 GMT Message-ID: <20010618.7283600@barney.home.mrhagar.com> Subject: natd and Apache Port Based Virtual Hosting To: freebsd-questions@FreeBSD.ORG X-Mailer: Mozilla/3.0 (compatible; StarOffice/5.2;Linux) X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Can anyone tell me how I configure Port based Virtual Hosts in Apache so= =20 that they correctly work with translated packets. It is my understandin= g=20 that all natd is doing is taking the external address, striping it and=20 adding an internal address. If this is the case then I believe the=20 following entries in my httd.conf should be working? # Use name-based virtual hosting. # #NameVirtualHost 192.168.1.201 Listen 80 Listen 8080 Listen 8081 Listen 8082 # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # ServerAdmin a@b.com DocumentRoot /data/www/abc ServerName 192.168.1.201:8080 ErrorLog /data/www/abc/logs/error_log TransferLog /data/www/abc/logs/access_log =20 ServerAdmin a@b.com DocumentRoot /data/www/xyz ServerName 192.168.1.201:8082 ErrorLog /data/www/xyz/logs/error_log TransferLog /data/www/xyz/logs/access_log This works fine from any internal host, but not from external ones, whic= h=20 just default to the default site at port 80. In an attempt to get this problem resolved I have set the firewall to=20 allow all and my rc.conf calls the my natd.conf file containing these=20 enteries. # log yes redirect_port tcp 192.168.2.201:80 80 redirect_port tcp 192.168.2.201:8080-8082 8080-8082 Any help will be gratefully received. Simon Maycock To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message