Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Aug 25, 2011 3:54 pm 
Offline
Junior Member

Joined: Sun Jun 26, 2011 6:42 pm
Posts: 32
I have a number of domains pointing to the same ip address using Apache virtual host. It works great. Now I have a site hosted on a different server that I want to move and test on my Linode server using Virtual Host. I want to test it before changing the DNS forwarding to the new server. How can I test?

Something like http://173.255.1.1:domainname.com

Nothing that I try like this works.


Top
   
 Post subject:
PostPosted: Thu Aug 25, 2011 4:36 pm 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
Edit your computer's local hosts file and point that ip address to that domain name.

Code:
173.255.1.1        domainname.com


Top
   
 Post subject:
PostPosted: Thu Aug 25, 2011 5:24 pm 
Offline
Junior Member

Joined: Sun Jun 26, 2011 6:42 pm
Posts: 32
OK but then how do I access the original server/site with my browser?

I guess for the purposes of the testing I could give the new server a different domain name temporarily to keep the two straight.

Thanks.

Now that I know how that host file works I'm mapping all my local fixed ip address boxes - routers, network printers, DirecTV receivers, to names. Cool.


Top
   
 Post subject:
PostPosted: Thu Aug 25, 2011 5:36 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Edit your computer's local hosts file and remove the line that you added in Step 1.

Or: create a DNS record, e.g. "dev.example.com", to point to the new IP. Tell your web server to expect traffic on dev.example.com, and it shall work. This is much more useful, especially when multiple people need to share in the hallucination.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Thu Aug 25, 2011 5:52 pm 
Offline
Junior Member

Joined: Sun Jun 26, 2011 6:42 pm
Posts: 32
hoopycat wrote:
Create a DNS record, e.g. "dev.example.com", to point to the new IP. Tell your web server to expect traffic on dev.example.com, and it shall work.

This sounds good. So if I understand it correctly, if "example.com" has a DNS record somewhere (? I'm not sure where) that points to ipaddress1 then I could create a DNS record somewhere that points dev.example.com to my Linode server at ipaddress2.

My question is where can that second DNS reference be made if I want the client to see the test site? Does it have to be with the origional domain name registrar or would it work to just use the Linode DNS service? I'm guessing I have to get to the original registrars records.


Top
   
 Post subject:
PostPosted: Fri Aug 26, 2011 10:58 am 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
You'd add the "dev" record to whichever nameservers are handling example.com. The same place you'd go to point www.example.com to a different IP address, basically. Might be with the original registrar, or it might be with the current hosting company, or it might be with someone entirely different.

Or!, if you have another domain within your control (i.e. your main/"corporate" domain) and don't want to muck around with the existing domain at all, you can also add a record to your domain. This is handy when customers are involved, since you can fling something up without involving them at all.

Say your domain is sodtech.net, and you're working on a new site to replace example.com. You could add "example.sodtech.net" to sodtech.net's DNS, and set it up in your web server as an alias for the new example.com site.

Both approaches work just fine, and would allow the site to be visible to anyone who knows the temporary location.

(Which reminds me: you might want to set up basic authentication to "hide" the site a bit while it's under development. I use an approach not unlike the "READ ME: username is foo, password is bar" used on forum.linode.com; just enough to keep the bots out.)

_________________
Code:
/* TODO: need to add signature to posts */


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


Who is online

Users browsing this forum: No registered users and 1 guest


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