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

Php

PHPmyadmin

Apache2

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!

Chris

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:

127.0.0.1        localhost.localdomain        localhost
my.IP.add.ress      myhostname.pixelatedphotographer.com             myhostname

Does this look ok or have I stuffed up?

The document root is /srv/www/pixelatedphotographer.com/public_html/ 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 http://www.heidisql.com/ 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.

> 127.0.0.1 localhost.localdomain localhost

xxx.xxx.xxx.xx xxxx.pixelatedphotographer.com 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 127.0.0.1 localhost; do I add all the server info?:

xxx.xxx.xxx.xx xxxx.pixelatedphotographer.com xxxxx ?

I got no love with that at all

http://www.techwebtips.com/apple-mac/mo … eopard-14/">http://www.techwebtips.com/apple-mac/modify-hosts-file-mac-os-x-leopard-14/

Add

11.22.33.44 www.yourdomainname.com

Putting your LINODE PUBLIC IP ADDR for 11.22.33.44

***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!

Reply

Please enter an answer
Tips:

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] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct