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?
views:
75answers:
1
+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
2010-07-16 10:31:19
On Windows the `hosts` file is generally located in `C:\Windows\system32\drivers\etc`. On Ubuntu you can find it in `/etc`.
Nalum
2010-07-16 10:35:00
-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
2010-07-16 10:44:45
@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
2010-07-16 10:46:38
@Pekka.. hm.. i thought he was looking to access production server in LAN
Sandy
2010-07-16 10:51:09
Hi, do you know where it's located on linux? (I'm working with mac...)
apple_pie
2010-07-16 10:56:51
@apple see @Nalum's comment - `/etc/hosts` it should be.
Pekka
2010-07-16 10:58:17
I did it but it doesn't seem to work. I even restarted my computer.. Should I do anything else?
apple_pie
2010-07-16 11:11:22
@apple What does the exact line look like?
Pekka
2010-07-16 11:12:10
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
2010-07-21 07:40:52