Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 31630 invoked by uid 500); 12 Dec 2001 18:26:42 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 31619 invoked from network); 12 Dec 2001 18:26:42 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Ryan Bloom Reply-To: rbb@covalent.net Organization: Covalent Technologies To: dev@httpd.apache.org, "HARADA,LIZA (HP-Cupertino,ex1)" , "'dev@httpd.apache.org'" Subject: Re: Virutal Host and ServerName with ports... Date: Wed, 12 Dec 2001 10:29:53 -0800 X-Mailer: KMail [version 1.3] References: <580F4ACFCD8F4E439B06B815110418C75E306D@xcup03.cup.hp.com> In-Reply-To: <580F4ACFCD8F4E439B06B815110418C75E306D@xcup03.cup.hp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20011212182954.01A6546E02@koj.rkbloom.net> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi. The big thing about ServerName in 2.0 is that it has taken over for the Port directive from 1.3. So, the following config means that the server listens on 127.0.0.1, port 8080, but reports itself as foo.com on port 80. ServerName foo.com:80 That reporting is done whenever the server creates a self-referential URL, which is done by mod_dir, and in all error pages among other places in the code. The ServerName directive NEVER controls the port that the server actuall listens on. Ryan On Wednesday 12 December 2001 10:16 am, HARADA,LIZA (HP-Cupertino,ex1) wrote: > Hello there, > > I am trying to understand the VirtualHost directives for Apache 2.0, > specifically with regards to specifying the port. With ServerName directive > now able to specify ports, it brings another element into the picture. Does > it make a difference if the port is specified in the my.ip.addr.here:port> or in the ServerName my.domain.here:port ? What about > if there are multiple ip addresses/ports specified in the Virtual Host? How > does that affect the ServerName? Is it best to specify the multiple > ports/ip in the VirtualHost directive and then leave the ServerName with > only the domain.name and no port? > I hope this makes sense. > > Here is an example : > ... > Listen 1.2.3.4:80 > Listen 1.2.3.5:8080 > ServerName server.domain.com > > #VHOST 1 > DocumentRoot /www/domain > ServerName www.domain.com > ... > > > # VHOST 2 > ServerName other.domain.com > ... > > > Can VHOST 1 be specified instead: > #VHOST 1 > DocumentRoot /www/domain > ServerName www.domain.com:80 > ... > > > or would it be legal to do this?: > #VHOST 1 > DocumentRoot /www/domain > ServerName www.domain.com:?? #maybe no port specified? > ... > > > Thanks in advance, > Liza -- ______________________________________________________________ Ryan Bloom rbb@apache.org Covalent Technologies rbb@covalent.net --------------------------------------------------------------