Seeing site without pointing DNS
Normally I would add the domain name I'm working on and the linode ip to my local hosts file so I could work on the site in dev while client and rest of the world still sees the old site. Then when time is ready, go to godaddy and point the DNS.
But what if I don't have a local hosts file? Can't get shell access on the computer I'm using. How can I see a site that does not have the dns pointed to it?
I've asked the guys in support if there was something like http://linodeip.domainsever.something…but they've told me, no. I'd need to use a browser that could send host headers without using the actual domain. I'm locked into Chrome and I don't see this function.
I've looked up some sort of virtual hosts file, etc or proxy…but I can't seem to put my finger on it.
Any help would be appreciated.
Steven
9 Replies
@mco2669:
I've asked the guys in support if there was something like http://linodeip.domainsever.something…but they've told me, no.
Not sure if this is what you mean, but every linode comes with a default reverse DNS entry of liXX-YYY.members.linode.com.
One thing to be aware of when using a different (sub)domain for testing your website, however, is that some apps will break when you change the (sub)domain. For example, WordPress 2.x used to remember which domain it was on, and refused to function properly when moved to another domain. You had to change a couple of rows in the database before WordPress would play along. I don't know if WordPress 3.x still does this, but it was very annoying. Other apps might do this too, if it insists on using absolute URLs.
> I don't know if WordPress 3.x still does this, but it was very annoying.
Yes, that huge mass of spaghetti code known as WordPress still hard codes the FQDN it's installed at inside the database.
@mco2669:
But what if I don't have a local hosts file? Can't get shell access on the computer I'm using. How can I see a site that does not have the dns pointed to it?
Not sure how you can be doing legitimate dev work and NOT have shell access???
In any case, LIVE CD, edit hosts file, done.
If so then why would Google provide an OS with such limited shell features. Even dropping into "developer" mode supposedly just gets you a shell "similar to bash".
Wow.
You actually paid good money for that machine?