Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Dec 03, 2011 5:06 pm 
Offline
Senior Newbie

Joined: Sat Dec 03, 2011 10:29 am
Posts: 16
Website: http://www.tikke.co.il
Location: Israel
How can I enter a dev website on my linode only through the IP adress and not the domain which don't point to Linode yet?

I have tried - 1.2.3.4/srv/www/domain with no luck.
[1.2.3.4 - Is my IP]

_________________
CEO
TIKKE | Developing websites


Top
   
 Post subject:
PostPosted: Sat Dec 03, 2011 10:05 pm 
Offline
Senior Member
User avatar

Joined: Fri Dec 11, 2009 7:09 pm
Posts: 168
I do it by pointing my computers hosts file to the dev ip- for me it is /etc/hosts - win uses something like c:\windows\system32\drivers\etc\hosts

_________________
--
Chris Bryant


Top
   
 Post subject:
PostPosted: Sun Dec 04, 2011 1:22 am 
Offline
Senior Newbie

Joined: Sat Dec 03, 2011 10:29 am
Posts: 16
Website: http://www.tikke.co.il
Location: Israel
bryantrv wrote:
I do it by pointing my computers hosts file to the dev ip- for me it is /etc/hosts - win uses something like c:\windows\system32\drivers\etc\hosts


How do I do it? What are the commands?

_________________
CEO

TIKKE | Developing websites


Top
   
 Post subject:
PostPosted: Sun Dec 04, 2011 6:38 am 
Offline
Senior Member
User avatar

Joined: Tue Jan 04, 2005 7:32 am
Posts: 277
Website: http://www.betadome.com/
Location: Ă…lesund, Norway
Skype: neonnero
Twitter: neonnero
If you're using Windows, run Notepad (or a text editor) as Administrator (Windows Vista or 7 - for XP, it's not necessary), and open the file C:\WINDOWS\system32\drivers\etc\hosts (no file extension, and assuming that C:\WINDOWS is your Windows install folder).

If you're using Linux, use your favorite text editor and open the file /etc/hosts.

If you're using Mac OS X, see this article: Mac OS X: How to Add Hosts to Local Hosts File

When you have your hosts file open, add the following line (replace my examples with your Linode's IP and your domain name):
Code:
1.2.3.4       example.com www.example.com

It doesn't matter how many spaces you have between each of these "words", or if you're using the <tab> key, as long as there's some whitespace between them.


Top
   
 Post subject:
PostPosted: Sun Dec 04, 2011 7:50 am 
Offline
Senior Member

Joined: Sun Aug 31, 2008 4:29 pm
Posts: 177
Just to add to what NeonNero said...

On Windows, if the hosts file does not exist, create it.

On Windows in Notepad when saving the file, put the filename in quotes -- like "hosts" -- to prevent Windows from automatically adding a .txt extension.

hosts.txt will not work, the file must be named hosts with no extension.

_________________
sleddog


Top
   
 Post subject:
PostPosted: Sun Dec 04, 2011 9:38 am 
Offline
Senior Newbie

Joined: Sat Dec 03, 2011 10:29 am
Posts: 16
Website: http://www.tikke.co.il
Location: Israel
NeonNero wrote:
If you're using Mac OS X, see this article: Mac OS X: How to Add Hosts to Local Hosts File

When you have your hosts file open, add the following line (replace my examples with your Linode's IP and your domain name):
Code:
1.2.3.4       example.com www.example.com

It doesn't matter how many spaces you have between each of these "words", or if you're using the <tab> key, as long as there's some whitespace between them.


I a mac user - The link isn't working but I have edit my local /etc/hosts file and add this follow line:
1.2.3.4 domain.com domain [with the correct details].
I added the linode IP.
Nothing happens when entering this IP in the browser.

What am I missing here?

_________________
CEO

TIKKE | Developing websites


Top
   
 Post subject:
PostPosted: Sun Dec 04, 2011 9:46 am 
Offline
Senior Newbie

Joined: Sat Dec 03, 2011 10:29 am
Posts: 16
Website: http://www.tikke.co.il
Location: Israel
Forgot sudo...
Working now...

Thank you...

_________________
CEO

TIKKE | Developing websites


Top
   
 Post subject:
PostPosted: Sun Dec 04, 2011 10:00 am 
Offline
Senior Member
User avatar

Joined: Fri Dec 11, 2009 7:09 pm
Posts: 168
I keep the required lines in my hosts file and just #comment them out when needed .

_________________
--

Chris Bryant


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


Who is online

Users browsing this forum: No registered users and 5 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