httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex \"Sniper\" Togstad" <sni...@3dretreat.com>
Subject Runing Virtual Hosting behind a router.
Date Thu, 31 Jan 2002 23:30:03 GMT
Hello!

I have 2 domains and I need them to be forwared to my IP. (12.224.237.169)

I have set up a DNS server on my box:

ns1.domain1.com - 12.224.237.169
ns2.domain.com - 12.224.237.168 - dumy IP

I have Simple DNS insalled on my comp, and I'm pretty sure I set it up correctly!

I would like to keep the domains kept private till a known launch date if you don't mind,
thus the reason for domain1.com and domain2.com

DocumentRoot C:/www/htdocs/ 

In "DocumentRoot" I have my personal webpage, and then I have other folders for the domains:

domain1.com 
domain2.com 

domain1 root: 
C:/www/htdocs/domain1.com 

domain2 root: 
C:/www/htdocs/domain2.com 

I'm on a linksys router, and I have port 80, 53, and 21 forwarded to my box. My internal IP
is 192.168.1.2, and my "IP" is 12.224.237.169.

I figured out everytime I put the internal IP for the primary vhost like this: "<VirtualHost
192.168.1.2 12.224.237.169>" then it would not show the index file for domain1.com, but
show the index file for "http://12.224.237.169". 

But when I took out the internal IP for the primary vhost then I could see the domain1.com
contents by going to www.domain1.com and "http://12.224.237.169". NOTE: I should not see the
contents of domain1.com thru "http://12.224.237.169". 

When I go to www.domain1.com I should see a different html file thant that one for my IP.
As you can see the domain1.com root is different that the other one, but still I see the the
contents of the 12.224.237.169 webpage when I'm at the domain1.com url. 

At this point I'm stuck. I don't know how I should have Virtual Hosting setup. I know something
is wrong, but I can't quiet get my finger on it!


Thank you very much for your time and help!

My httpd.conf file below:

==============================================
NameVirtualHost 12.224.237.169:80
#
#Virtual Host info for The Outpost
#
<VirtualHost 192.168.1.2 12.224.237.169>
    # primary vhost
    ServerName http://12.224.237.169
    ServerAdmin alextogstad@3dretreat.com
    DocumentRoot c:/www/htdocs/
</VirtualHost>
#
#Virtual Host info for domain1
#
NameVirtualHost 12.224.237.169
<VirtualHost 192.168.1.2 12.224.237.169>
    ServerName www.domain1.com
    ServerAdmin alextogstad@3dretreat.com
    DocumentRoot c:/www/domain1.com
</VirtualHost>
============================================



Mime
View raw message