About Virtual Hosting, plz HELP

Sir postroad at mediaone.net
Wed Apr 18 03:25:56 UTC 2001


The virtual hosts directive in Apache has very little to do with the DNS
entries you are listing.  What you may be missing is the "Listen" directive in
Apache. You need to tell apache what IPs and ports to listen to.  It's a ways
up in the httpd.conf file. Do a "grep -n Listen httpd.conf" and see if you have
"Listen 80". As far as DNS, it will just resolve a  cononical name to an IP.
Your DNS  output looks garbled.  I have always avoided CNAME records because I
noticed that UUNET ( the only ISP I still respect) never used them. Stick to
"A" records;

www        IN        A    1.2.3.4

Ella wrote:

> Hi all,
>
> I am in trouble.
> What I am to do is to host an additional virtual host www.waphotmail.com.
>
> I have tried looking into ducuments and helps, but everytime
> www.waphotmail.com
> just redirect to the documents of www.hkix.com though I have declared the
> different
> DocumentRoot in the Apache config. file httpd.conf:
>
> >>>>>>>>
> ServerType standalone
> ServerRoot "/usr/local/apache"
> ServerAdmin error at hkix.com
> ServerName www.hkix.com
> DocumentRoot /home/hkix/htdocs
> ScriptAlias /cgi-bin/ /home/hkix/cgi-bin/
>
> NameVirtualHost 202.66.165.84
>
> <VirtualHost 202.66.165.84>
> ServerName www.waptomail.com
> DocumentRoot /home/waptomail/htdocs
> </VirtualHost>
> <<<<<<<<
>
> and my cashe file is as follwing:
> @       IN      SOA     ns.hkix.com.    webmaster.hkix.com. (
>                 2001012201 ; serial
>                 10800 ; refresh
>                 3600 ; retry
>                 3600000 ; expire
>                 36000 ); default_ttl
>         IN      NS     ns.hkix.com.
>         IN      NS     ns2.hkix.com.
> www     IN      CNAME  202.66.165.84
>         IN      A      202.66.165.84
> *       IN      A      202.66.165.84
>
> When I ran the bin/apacheclt configtest to test my httpd.conf configuration,
> it returns:
> >>>>>>>>>>>
> [Sun Apr 15 16:47:30 2001] [warn] NameVirtualHost 202.66.165.84:80 has no
> VirtualHosts
> [Sun Apr 15 16:47:30 2001] [warn] NameVirtualHost 202.66.165.84:80 has no
> VirtualHosts
> Syntax OK
>
> Why could it say it has no any Virtualhosts?
> Is that I did something wrong?
>
> Please give helps !!!
> Thanks in advance.
>
> Ella



More information about the bind-users mailing list