Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

There seem to be more questions like this, excuse me if this is similar. I want to redirect to an IP address om my server computer.

This is what I put in my hosts file on the client computer (IMac):

192.168.3.2:8080. dev.dev

It does not resolve to that IP address. Should this normally work, or do I have to do extra things?

(The IP address works in the browser).

share|improve this question
    
remove the port assignment. Name resolution doesn't concern itself with TCP ports. –  jordanm Oct 28 '13 at 1:48
    
OK, so I will have to type that after the name in the browser –  Richard Oct 28 '13 at 1:54

1 Answer 1

up vote 1 down vote accepted

You do not specify the port in a hosts file. The hosts file expects IP and hostname on each line. Try removing the port, as well as the dot after the IP that I also see in your entry.

e.g.

192.168.3.2    dev

then try http://dev:8080 in your browser to get to that host:port. You may need to flush the cache on your client computer. From the terminal in OSX 10.6+:

sudo dscacheutil -flushcache
share|improve this answer
    
Sorry, the dot was a typo, thank you both, that should solve it. I turned the server off now, but I am gonna test it tomorrow. –  Richard Oct 28 '13 at 1:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.