[NTLUG:Discuss] Virtual Hosting on Apache

Jack-I-Need-a-Job-Snodgrass idiotboy+ntlug at cybermail.net
Sun Mar 24 06:09:45 CST 2002


You use ( for example )

# tell the system what IPs have multiple names associated with it.
NameVirtualHost 10.10.1.1

# set up each virtualhost. the servername is what the server
# looks for in the clinet connect to determine where to point
# the user.

<VirtualHost 10.10.1.1>
   serveradmin root at domain.com
   documentroot /www/htdocs/namedhosts/domain.com
   servername www.domain.com
   errorlog logs/domain.com-error_log
   customlog logs/domain.com-access-log common
</VirtualHost>

<VirtualHost 10.10.1.1>
   serveradmin root at domain.net
   documentroot /www/htdocs/namedhosts/domain.net
   servername www.domain.net
   errorlog logs/domain.net-error_log
   customlog logs/domain.net-access-log common
</VirtualHost>

Note, you need to have a regular setup for
10.10.1.1 in case some one ends up there instead of
at domain.net and domain.com. Some browsers are
going to end up a the main 10.10.1.1 site becuase
they don't support named based virtual hosting.

jack


----- Original Message -----
From: "Stephen Davidson" <gorky at freenet.carleton.ca>
To: <discuss at ntlug.org>
Sent: Saturday, March 23, 2002 3:56 PM
Subject: Re: [NTLUG:Discuss] Virtual Hosting on Apache


> David Stanaway wrote:
> > ----- Original Message -----
> > From: Stephen Davidson <gorky at freenet.carleton.ca>
> > To: NTLUG <discuss at ntlug.org>
> > Sent: Saturday, March 23, 2002 3:36 PM
> > Subject: [NTLUG:Discuss] Virtual Hosting on Apache
> >
> >
> >
> >>Greetings.
> >>
> >>I am trying to set up two domains on an Apache Webserver, but I am doing
> >>
> > something wrong.
> >
> >>Neither domain is available.
> >>
> >>Where do I need to look?  I can send/post the Apache configuration file
if
> >>
> > it would help.
> >
> > Do you have a line:
> > NameVirtualHost
> >
> > with the IP address of your webserver?
> >
> > A good place for that is above the VirtualHost entries in httpd.conf
> >
> >
> > --
> > David Stanaway
> >
> >
> >
> > _______________________________________________
> > http://www.ntlug.org/mailman/listinfo/discuss
> >
> >
>
> Oh.  So the following would not work.
> #NameVirtualHost *
> NameVirtualHost rexelusa.com
> NameVirtualHost rexeldeals.com
>
>
> I should instead try;
> #NameVirtualHost *
> NameVirtualHost mydomain1.com  10.10.1.1
> NameVirtualHost mydomain2.com 10.10.1.1
> ??
>
> Regards,
> Steve
>
> --
> Stephen Davidson
> Java Consultant
> Delphi Consultants, LLC
> http://www.delphis.com
> Phone: 214-696-6224 x208
>
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>





More information about the Discuss mailing list