Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Sorry for the noob question but I can't seem to find proper literature on the subject:

Currently I'm forced to type my IP address to get to my CentOS VM local environment:

192.168.56.101

How can I change this to something like localhost?

share|improve this question

1 Answer 1

You will not be able to change it to localhost as this is reserved for 127.0.0.1 loopback address. RFC2606 - http://tools.ietf.org/html/rfc2606

However you could set something up using DNS, say if you had an A record set up on your DNS server for yourvm.yourdomain.local with the IP address you specified, then it would work.

A crude way of doing this just for a handful of workstations could be to edit the hosts file and create an entry for the vm and it's IP.

Apologies I'm quite *nix challenged, there probably is an option to make the vm register itself in DNS, but I wouldn't know where to begin on this route.

share|improve this answer
    
Well the config file is probably the right route using a <VirtualHost *> wrapper in the /etc/httpd/conf/httpd.conf file. I'm looking over this documentation carefully but I don't have any name registered with the server because it's for Development and not production. So I'm confused. –  AlxVallejo Feb 21 '12 at 22:00

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.