Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Oct 15, 2010 12:24 pm 
Offline
Senior Newbie

Joined: Fri Oct 15, 2010 12:18 pm
Posts: 11
Is there a way I can access virtualhost entries via the server's ip address and without the domain names actually pointing to the server?

What I am wanting to do it test the multiple sites before changing over the DNS stuff from the old host.

Thanks!


Top
   
 Post subject:
PostPosted: Fri Oct 15, 2010 12:39 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Just create entries in your HOSTS file (which should work for either Linux or Windows, I'd presume also OS X) for the domains. The server doesn't care anything about DNS, just what hostname the web browser passes in the "Host" header.

In other words, all that matters is what hostname the client thinks they're accessing.


Top
   
 Post subject:
PostPosted: Fri Oct 15, 2010 12:42 pm 
Offline
Senior Newbie

Joined: Fri Oct 15, 2010 12:18 pm
Posts: 11
Guspaz wrote:
Just create entries in your HOSTS file (which should work for either Linux or Windows, I'd presume also OS X) for the domains. The server doesn't care anything about DNS, just what hostname the web browser passes in the "Host" header.

In other words, all that matters is what hostname the client thinks they're accessing.


Thanks for the reply! Your recommendation would only work locally though, right? What about testing on Linode?


Top
   
 Post subject:
PostPosted: Fri Oct 15, 2010 12:45 pm 
Offline
Senior Member

Joined: Mon Oct 27, 2008 10:24 am
Posts: 173
Website: http://www.worshiproot.com
You need to have the hosts file configured on the system you're accessing the site from. It doesn't matter what the DNS configuration on the server is.

BTW, there's no need to quote someone's entire reply if you're just replying to them.


Top
   
 Post subject:
PostPosted: Fri Oct 15, 2010 12:47 pm 
Offline
Senior Member

Joined: Sat Mar 28, 2009 4:23 pm
Posts: 415
Website: http://jedsmith.org/
Location: Out of his depth and job-hopping without a clue about network security fundamentals
Doing /etc/hosts locally will make your browser pass along:

Quote:
Host: foo.example.com

This is the necessary magic to make virtual hosts work, without putting them in DNS just yet. Your Linode's DNS configuration shouldn't matter.


Top
   
 Post subject:
PostPosted: Fri Oct 15, 2010 12:47 pm 
Offline
Senior Newbie

Joined: Fri Oct 15, 2010 12:18 pm
Posts: 11
Ah, I get it now, thanks!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group