[NTLUG:Discuss] Virtual Hosting
Chris Albertson
alb at chrisalbertson.com
Mon Feb 3 21:45:55 CST 2003
In virt name hosting, the very first entry in the list of virtual hosts
will be the default website if the request doesn't match any other
virtual sites. I place my "you have reached a bad address" page on the
first entry.
Also, it looks like the registrar is just forwarding people to an IP
address instead of a dns name. Thus, you're not getting the full http
header which is required by the apache server to get the named virtual
hosting to work.
You may want to think about doing your own DNS hosting. It's a really
good thing to learn about, if you're not already comfortable with DNS
hosting.(Yes, you can host DNS with nat as well. That's what I have
going)
Good luck
--
Chris J Albertson
alb at chrisalbertson.com
4783147098
On Mon, 2003-02-03 at 20:32, jose sanchez wrote:
> Hello All:
>
> I am experiencing a weird problem with Name based
> virtual hosting with apache. I don't know if I am
> doing this correctly. The webserver is behind a
> firewall that is NATing traffic to it.
>
> I have three domain names, example: domain1.com,
> domain2.com, and domain3.com. I have the registrar of
> the domains forwarded to my external ip (24.31.xx.xx).
> The webserver's ip is 192.168.2.50. This is what the
> http.conf file looks like:
>
> NameVirtualHost 192.168.2.50
>
> <VirtualHost 192.168.2.50>
> ServerName www.domain1.com
> ServerAdmin wilsan816 at yahoo.com
> DocumentRoot /home/domain1/www
> </VirtualHost>
>
> <VirtualHost 192.168.2.50>
> ServerName www.domain2.com
> ServerAdmin wilsan816 at yahoo.com
> DocumentRoot /home/domain2/www
> </VirtualHost>
>
> <VirtualHost 192.168.2.50>
> ServerName www.domain3.com
> ServerAdmin wilsan816 at yahoo.com
> DocumentRoot /home/domain3/www
> </VirtualHost>
>
> Somehow the virtual hosting is not working. When I
> type www.domain2.com or www.domain3.com on the browser
> I get the content or pages of domain1.com. I don't
> know why is doing that. When I type www.domain1.com,
> obviously works.
>
> Now, the address bar changes from www.domainx.com to
> 24.31.xx.xx/index.php. The registrar where the domains
> are registered doesn't offer free "Domain Masking"
> (when the domain name stays on the browser' address
> bar). I don't know if this is why I am having this
> problem. If anyone have experienced this before please
> let me know.
>
> Thanks in advance.
>
> =====
> "An ounce of gold cannot buy an ounce of time."
> - Anonymous
>
>
> www.whmicro.com
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> _______________________________________________
> https://ntlug.org/mailman/listinfo/discuss
More information about the Discuss
mailing list