Take the 2-minute tour ×

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:

How can I change this to something like localhost?

share|improve this question
add comment

1 Answer

You will not be able to change it to localhost as this is reserved for 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
add comment

Your Answer


