Virtual Host in Dinamic IP

Virtual Host in Dinamic IP

Post by jose Mace » Wed, 10 Oct 2001 08:16:10



Hello

I have Apache Configured like this:

NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
        ServerName                         www.mydomain.com
        DocumentRoot            "c:/apache/htdocs/mydomain/www"
</VirtualHost >
<VirtualHost 127.0.0.1>
        ServerName                         www.mydomain2.com
        DocumentRoot            "c:/apache/htdocs/mydomain/www"
</VirtualHost >

that's works fine in my land. But every time I disconnect and connect
the Internet My IP Number changes.... Even writing 127.0.0.1 what
happens is that when i type www.mydomain2.com the browser reach
www.mydomain.com.

Could anyone help me width that?

 
 
 

Virtual Host in Dinamic IP

Post by Chinchill » Thu, 11 Oct 2001 02:34:56


It would appear with your config file that both domains point to the same
document root path.  I'm not an Apache user, but that's what your configuration
file tells me.  Therefore both domains will display the same content.

If you want external traffic to get to your pages, you'll also want to make sure
your DNS settnigs don't point mydomain.com/mydomain2.com to your local IP
address.  Any references in your HTML to those domains will point the visitor to
their localhost address.

Additionally, if you're looking for external traffic without the hassles of
dynamically assigned IP address, check out DNS2Go.  They offer free service for
DNS2Go domains (e.g. you.dns2go.com) or a top level domain (you.com) that points
your domain to your current IP address.  Clients available in Windows,
Linux/FreeBSD (x86) and soon (I heard) in Perl.

Good luck,
Chinch

On 8 Oct 2001 16:16:10 -0700, jose Macedo said...

Quote:

>Hello

>I have Apache Configured like this:

>NameVirtualHost 127.0.0.1

><VirtualHost 127.0.0.1>
>    ServerName                         www.mydomain.com
>    DocumentRoot            "c:/apache/htdocs/mydomain/www"
></VirtualHost >
><VirtualHost 127.0.0.1>
>    ServerName                         www.mydomain2.com
>    DocumentRoot            "c:/apache/htdocs/mydomain/www"
></VirtualHost >

>that's works fine in my land. But every time I disconnect and connect
>the Internet My IP Number changes.... Even writing 127.0.0.1 what
>happens is that when i type www.mydomain2.com the browser reach
>www.mydomain.com.

>Could anyone help me width that?

---
To reply direct, remove NOSPAM in address