Checking a site without the domain URL

Hi guys, I'm a new guy trying to wade through this stuff and I have a few questions.

I'm moving a site from another host over to linode, so I have setup the following:

Ubuntu 10.04




Added virtual hosts file etc

I have put the files and folders in the public_html folder. Is there any way I can test this without the domain name yet? i.e. IPaddress/website or something. At the moment I don't know if everything is working because I don't know how to test it. It may be a really obvious answer but I can't find it.

I have put the IP address on its own and it tells me 'It works', so I guess i'm on the right path.

Any help would be great!


11 Replies

Put your Linode's IP in your host file and point it to your domain (on your local machine).

Cheers Derfy, I don't have anything set up on my local machine at all, so it's just the server (unless I miss-read your post).

In my hosts file I have:        localhost.localdomain        localhost
my.IP.add.ress             myhostname

Does this look ok or have I stuffed up?

The document root is /srv/www/ is this also the right place to put the files? I have phpmyadmin in there and that shows up fine.

Sorry, I was unclear. I should have put (on your local machine) after 'in your hosts file'. This makes your machine contact that IP for the domain and your Linode will pick up on the Host: header and use the proper virtual host.

I recommend not using phpmyadmin; instead, use something like Works over a tunnel (something PuTTY or SecureCRT can do) and doesn't leave database access open to the world.

re: the document root. Sounds right; once you get your host file set up to test with you'll know for sure.

Thanks, though still unclear what you mean (Sorry!).

I have done all the settings in the host file, but it isn't working.

> localhost.localdomain localhost xxxxx

^^^ ^^^ ^^^^

Linode IP add Servername Servername
Do we have to change 'localhost.localdomain localhost' to something?

I don't have any errors when restarting, it seems to be happy - it just doesn't move.

In the default file, there is:
> DocumentRoot /var/www

Options FollowSymLinks

AllowOverride None

Options Indexes FollowSymLinks MultiViews

AllowOverride None

Order allow,deny

allow from all
Should it be DocumentRoot /srv/www.pixelated……. Because that is what my main setup is pointing to, not /var/ ?

Sorry to be a pain, just very new at all this!

Assuming you're using windows, open c:\windows\system32\drivers\etc (on your local machine). There you will see a 'hosts' file. Open it with notepad and make the changes there. Save it (as 'hosts', not 'hosts.txt' or anything else!) and you should be good to go.

cheers - I'm actually on a mac but I found the equivalent file.

what exactly should I enter here? it already has localhost; do I add all the server info?: xxxxx ?

I got no love with that at all … eopard-14/">


Putting your LINODE PUBLIC IP ADDR for

***This is on your local workstation - NOT your LINODE.

Thanks to both of you. I got it working- i left out the www. which was throwing it off.

Thanks guys!


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct