[vox-tech] apache question: virtualhost not working

Ken Bloom vox-tech@lists.lugod.org
Sun, 11 Apr 2004 13:49:39 -0700


--BOKacYhQ+x31HxR3
Content-Type: text/plain; Format=Flowed; DelSp=Yes; charset=ISO-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable


On 2004.04.11 13:18, Peter Jay Salzman wrote:
> On Sun 11 Apr 04,  9:40 AM, Henry House <hajhouse@houseag.com> said:
> > P=E5 s=F6ndag, 11 april 2004, skrev Rod Roark:
> > > On Sunday 11 April 2004 07:04 am, Peter Jay Salzman wrote:
> > > ...
> > > >    NameVirtualHost 64.142.25.39:80
> > > >
> > > >    <VirtualHost www.liberal.ws:80>
> > > >       ServerAdmin p@dirac.org
> > > >       DocumentRoot /home/p/linux
> > > >       ServerName www.liberal.ws
> > > >       ErrorLog /var/log/apache/test_error
> > > >       LogLevel warn
> > > >       CustomLog /var/log/apache/test_access common
> > > >    </VirtualHost>
> > >
> > > What works for me looks like this:
> > >
> > >    NameVirtualHost 64.142.25.39
> > >    <VirtualHost 64.142.25.39:80>
> > >       etc.
> >
> > Rod is right; you need the NameVirtualHost directive when virtual hosts
> share
> > the same IP address (i.e., there are multiple DNS A records for your =
=20
> the
> IP
> > address of your server, or there are CNAME records giving it additional
> > names).
>=20
> i'm confused -- isn't that what i have above?
>=20
> i have two domains, www.dirac.org and www.liberal.ws.  i want:
>=20
>    www.dirac.org  -> document root /www
>    www.liberal.ws -> document root /www/p/linux
>=20
> www.dirac.org already works.  it's configured correctly.  in order to
> add www.liberal.ws, i tried adding this:
>=20
>=20
>     NameVirtualHost 64.142.25.39:80
>=20
>     <VirtualHost www.liberal.ws:80>
>        ServerAdmin p@dirac.org
>        DocumentRoot /home/p/linux
>        ServerName www.liberal.ws
>        ErrorLog /var/log/apache/test_error
>        LogLevel warn
>        CustomLog /var/log/apache/test_access common
>     </VirtualHost>
>=20
> is that not correct?
>=20
> pete

I'm no apache expert here, (I don't even run apache), but isn't rod saying =
=20
you should be saying the following in your apache configuration:

NameVirtualHost 64.142.25.39:80
<VirtualHost 64.142.25.39:80>
   ServerAdmin p@dirac.org
   DocumentRoot /home/p/linux
   ServerName www.liberal.ws
   ErrorLog /var/log/apache/test_error
   LogLevel warn
   CustomLog /var/log/apache/test_access common
</VirtualHost>

And that the hostname is given on the line starting "ServerName"

(And now that I've been poking around for information on this to see for =
=20
myself what the difference is, you can see as sample configuration at =20
http://www.phpfreaks.com/apache_manual/page/vhosts/name-based.html)


--=20
I usually have a GPG digital signature included as an attachment.
See http://www.gnupg.org/ for info about these digital signatures.
My key was last signed 10/14/2003. If you use GPG *please* see me about
signing the key. ***** My computer can't give you viruses by email. ***

--BOKacYhQ+x31HxR3
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBAea9jlHapveKyytERAtPmAJ9YBzuIxspDuBF/RgZS7a1yjZtQWgCfbhjy
loV5/CmGvDaWUDwpOArjZXQ=
=/6KY
-----END PGP SIGNATURE-----

--BOKacYhQ+x31HxR3--