How do I use the names in the services file?

This question arose because I am using port 3000 for some Ruby training, and I keep typing in...

http://127.0.0.1:3000

to access the ruby server.

I wanted to use a logical name in the address bar (eg. "ruby"), but found that the "hosts" file only names hosts, not ports. This led me to the "services" file, and I found that I can enter...

ruby                 3000/Tcp

in the file, but it doesn't seem to do anything. ie. I can't type

http://localhost:ruby

as I expected.

So, how do I use this name that I've entered? Is there some other way to accomplish my purpose of using a shorter name in the address bar?

Ta,

Javaman
Javaman59Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

giltjrCommented:
You can't that I am aware of.  Why would you want to?

You can use

     http://localhost:3000

you could add a alias in your hosts file for the loop back address called 'me'  then you could enter:

     http://me:3000

0
naveedbCommented:
You can't. The way HTTP works, you must enter the port after the hostname/ip address, which is also called socket.

One work around would be to create a small html page on your desktop which redirects to your ruby server, then you can access the server by opening the file. OR you can run a webserver with that redirect page, and should be able to access it with http://localhost
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Javaman59Author Commented:
Thanks giltj & naveedb. I like naveedb's two suggestions for a shortcut to my ruby server.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.