From owner-freebsd-questions Thu Dec 23 14:42:27 1999 Delivered-To: freebsd-questions@freebsd.org Received: from unix.megared.net.mx (megamail.megared.com.mx [207.249.162.252]) by hub.freebsd.org (Postfix) with ESMTP id 289B914C28 for ; Thu, 23 Dec 1999 14:41:55 -0800 (PST) (envelope-from ales@megared.net.mx) Received: from ales (pix.gdl.megared.net.mx [207.249.162.253]) by unix.megared.net.mx (8.9.3/8.9.3) with SMTP id QAA05321; Thu, 23 Dec 1999 16:40:34 -0600 (CST) (envelope-from ales@megared.net.mx) Message-ID: <05fe01bf4d96$e5543f00$d2630a0a@megared.net.mx> From: "Alejandro Ramirez" To: "Stuart Rogers" , References: <007501bf4d94$df267000$23144818@cableregina.com> Subject: RE: Apache 1.3.9 Vhosts Problem Date: Thu, 23 Dec 1999 16:41:47 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_05FB_01BF4D64.9AA16500" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. ------=_NextPart_000_05FB_01BF4D64.9AA16500 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, First, I would recommend to use NameVirtualHosts in Apache (it means = that you need just one IP Address to serve several diferent hosts & = pages). The aliasing thing in the NIC, it works like this, if your aliased IP = address that you are going to use, its in the same subnet that the one = that you have already, you need the 255.255.255.255 netmask, which will = tell the system that this IP address its in the same subnet, and it = wouldnt need any more routing information. But if your new IP Address, = its not in the same subnet that the first one, you will have to use the = right netmask for it. For NameVirtualHosts to work, you just need the following in your = "httpd.conf" file: NameVirtualHost a.b.c.d:80 ServerName mydomain.com ServerAlias www.mydomain.com host.mydomain.com DocumentRoot /usr/local/www/data/domains/mydomain ErrorLog /var/log/httpd/mydomain-error.log TransferLog /var/log/httpd/mydomain-access.log ErrorDocument 404 http://www.mydomain.com/ ServerName myotherdomain.com ServerAlias www.myotherdomain.com host.myotherdomain.com DocumentRoot /usr/local/www/data/domains/myotherdomain ErrorLog /var/log/httpd/myotherdomain-error.log TransferLog /var/log/httpd/myotherdomain-access.log ErrorDocument 404 http://www.myotherdomain.com/ and so on... Merry Xmas Ales ----- Original Message -----=20 From: Stuart Rogers=20 To: freebsd-questions@FreeBSD.ORG=20 Sent: Thursday, December 23, 1999 4:27 PM Subject: Apache 1.3.9 Vhosts Problem I was wondering if anyone has a complete Apache 1.3.9 httpd.conf = file that would show me how to set up Virtual Hosts in Apache. I'm new = to Apache and FreeBSD and have received very good help from this mailing = list but nothing seems to want to get Virtual Hosts working in Apache. I = have had people say you have to have your netmask set to 255.255.255.255 = but nobody has said why. When I set my netmask to that My internet = doesn't work so unfortantly I can set it to that. But if anyone has a = httpd.conf file they know works with Apache to get Virtual Hosts going = could you please HELP. I am running freeBSD 3.3. Thank you for anyhelp = you can give me. ------=_NextPart_000_05FB_01BF4D64.9AA16500 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
    First, I would = recommend to use=20 NameVirtualHosts in Apache (it means that you need just one IP Address = to serve=20 several diferent hosts & pages).
 
The aliasing thing in the NIC, it works = like this,=20 if your aliased IP address that you are going to use, its in the same = subnet=20 that the one that you have already, you need the 255.255.255.255 = netmask, which=20 will tell the system that this IP address its in the same subnet, and it = wouldnt=20 need any more routing information. But if your new IP Address, its not = in the=20 same subnet that the first one, you will have to use the right netmask = for=20 it.
 
For NameVirtualHosts to work, you just = need the=20 following in your "httpd.conf" file:
 
NameVirtualHost a.b.c.d:80
 
<VirtualHost = a.b.c.d>
  =20 ServerName mydomain.com
    ServerAlias www.mydomain.com host.mydomain.= com
   DocumentRoot=20 /usr/local/www/data/domains/mydomain
   ErrorLog=20 /var/log/httpd/mydomain-error.log
    TransferLog=20 /var/log/httpd/mydomain-access.log
   ErrorDocument 404 http://www.mydomain.com/
&l= t;/VirtualHost>
 
<VirtualHost = a.b.c.d>
  =20 ServerName myotherdomain.com
    ServerAlias www.myotherdomain.com host= .myotherdomain.com
   DocumentRoot=20 /usr/local/www/data/domains/myotherdomain
   ErrorLog=20 /var/log/httpd/myotherdomain-error.log
    TransferLog = /var/log/httpd/myotherdomain-access.log
   ErrorDocument = 404 http://www.myotherdomain.com/<= BR></VirtualHost>
 
and so on...
 
Merry Xmas
Ales
 
----- Original Message -----
From:=20 Stuart=20 Rogers
To: freebsd-questions@FreeBSD.ORG =
Sent: Thursday, December 23, = 1999 4:27=20 PM
Subject: Apache 1.3.9 Vhosts=20 Problem

    I was wondering if = anyone has=20 a complete Apache 1.3.9 httpd.conf file that would show me how to set = up=20 Virtual Hosts in Apache. I'm new to Apache and FreeBSD and have = received very=20 good help from this mailing list but nothing seems to want to get = Virtual=20 Hosts working in Apache. I have had people say you have to have your = netmask=20 set to 255.255.255.255 but nobody has said why. When I set my netmask = to that=20 My internet doesn't work so unfortantly I can set it to that. But if = anyone=20 has a httpd.conf file they know works with Apache to get Virtual Hosts = going=20 could you please HELP. I am running freeBSD 3.3. Thank you for anyhelp = you can=20 give me.
------=_NextPart_000_05FB_01BF4D64.9AA16500-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message