Re: /etc/hosts and DNS Behavior



Thomas,

The best way to handle this would be to have a different IPs for the
two sites.

If your main site was www.foo.bar.com and your dev site was
dev.foo.bar.com, then you're fine all the time.  If you have different
IPs, then you are just fine, too.  Just give each one a unique name in
your hosts file and voila!

However, if they share the same IP but have different names (ie:
name-based virtual hosts), then you can do this:

1.2.3.4         www.foo.bar.com         www.foo
1.2.3.4         wwwfoodev

Then, when you want to look at the dev site, just use wwwfoodev for the
hostname and make sure that apache returns wwwfoodev as the server name
and you should be just fine.

I used setups like that for a while until I decided to stop messing with
it and just use ip-based virtual hosts and creating dummy ethernet
devices or IP aliases to handle the IPs.  The IPs can even be private
IPs (10.x.y.z, 192.168.x.y, etc...).

--Jason

On Fri, 16 Apr 2004, Thomas F. O'Connell wrote:

> Is there any provision for Epiphany to use the version of /etc/hosts
> that was written when the active instance of Epiphany was launched?
> 
> What I'd like to be able to do would be to have a version of /etc/hosts
> that gets read upon launching one instance of epiphany (and possibly any
> other instances started by using Ctrl-N).
> 
> Then, I'd like to be able to modify /etc/hosts, launch another instance
> of Epiphany that used the modified version of /etc/hosts.
> 
> Each instance would remember the hosts file in effect at launch.
> 
> This way, I could simultaneously review a development and production
> version of the same website merely by modifying my hosts file.
> 
> If there's a system-level or Epiphany workaround that I'm not thinking
> of, that'd be great, too!
> 
> Thanks!
> 
> -tfo
> 
> P.S. Currently, the default behavior seems to be to use the /etc/hosts
> in effect at the launch of the first instance of Epiphany, regardless of
> how the window was launched (I.e., whether command-line or New Window).
> 
> _______________________________________________
> epiphany-list mailing list
> epiphany-list gnome org
> http://lists.gnome.org/mailman/listinfo/epiphany-list
> 
> 

-- 
Jason A. Pfeil                           jason=at=jasonpfeil.com.NOSPAM



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]