tags:

views:

75

answers:

1

Hi, web newbie here, I need to do some testing so I need to reach my development server (127.0.0.1 on Mac OS X) with a 'real' domian name (e.g. www.mydomain.example). any ideas?

+6  A: 

If it's for your machine only, manipulating the hosts file is the best option.

Add the following line to it:

127.0.0.1    www.mydomain.com

where it is located depends on your OS. If on Windows, do a search for hosts in C:\Windows\system32

You may have to restart your browser for it to take effect.

Pekka
On Windows the `hosts` file is generally located in `C:\Windows\system32\drivers\etc`. On Ubuntu you can find it in `/etc`.
Nalum
-1 127.0.0.1 is loopback ip address for each individual machinesCheck this http://compnetworking.about.com/od/workingwithipaddresses/g/127_0_0_1_def.htm
Sandy
@Sandy I know. So what? It is perfectly possible and legal to map arbitrary domain names to the local address. What is the problem here?
Pekka
@Pekka.. hm.. i thought he was looking to access production server in LAN
Sandy
Hi, do you know where it's located on linux? (I'm working with mac...)
apple_pie
@apple see @Nalum's comment - `/etc/hosts` it should be.
Pekka
I did it but it doesn't seem to work. I even restarted my computer.. Should I do anything else?
apple_pie
@apple What does the exact line look like?
Pekka
it's on my /etc/hosts (maybe it should be in /usr/etc/hosts, I don't know..) and it's127.0.0.1:8000 www.mbatour.co.il
apple_pie