Regarding Virtual Hosts

Rob listone at deathbeforedecaf.net
Fri May 16 20:26:17 PDT 2003


Have a look at /usr/local/etc/apache/httpd.conf.default - right at the
end is an example virtual host.

The general idea is to include the line

  NameVirtualHost *

then create some sections that look like

  <VirtualHost *>
    ServerName      www.mydomain.com
    DocumentRoot    /www/docs/mydomain.com
    ServerAdmin     webmaster at mydomain.com
    ServerSignature Email
    CustomLog       /var/log/httpd-mydomain.com.log combined
  </VirtualHost>

for each host, so the content for each site is in a separate directory.

Then you need to point all the domain names to your server's IP
address - how you do that depends on your nameserver.

See the docs at http://httpd.apache.org/docs/vhosts/index.html for a
more detailed discussion.

----- Original Message -----
From: "Matt L" <unix_parse at yahoo.com>
To: <questions at freebsd.org>
Sent: Saturday, May 17, 2003 11:59 AM
Subject: Regarding Virtual Hosts


> Hi this e-mail is regarding setting up virtual hosts using freebsd and
hosting multiple domains to point to my ip.  I currently registered
three domains and i'd like to host my web sites off my local machine.  I
was wondering how would i be able to have, http://www.mydomain.com and
http://www.mydomain2.com both domains pointing to different pages.  The
problem i'm currently having is; both domains point to the same default
domain being, domain 1.  Would i create the virtual hosts within
httpd.conf? if so how do i go about this.  Also, would i add the domains
i want to host on my machine within namedb?  Any clue or how to pages
would be greatly apperciated.
>
> My current version of freebsd is: FreeBSD 4.8-STABLE #3
>
> If anyone has gaim or another messenger and would be willing to give
me a hand that would also be greatly apperciated.  Thanks
>
> Regards, Matt
> JR. Unix Rookie :-)
>
>
> ---------------------------------
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
"freebsd-questions-unsubscribe at freebsd.org"
>



More information about the freebsd-questions mailing list