0

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?

AlxVallejo
  • 1,086
  • 4
  • 11
  • 19

1 Answers1

0

You will not be able to change it to localhost as this is reserved for 127.0.0.1 loopback address. RFC2606 - https://www.rfc-editor.org/rfc/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.

Robin Gill
  • 2,513
  • 14
  • 13
  • Well the config file is probably the right route using a 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