Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a local webapp that runs via Tomcast and Eclipse. Big chunks of it don't function well or properly when not accessing them from the localhost domain (for security reasons I am assuming, not totally sure).

I have Parallels installed on my OS X machine and I'd like to be able to type 127.0.0.1 into my Internet Explorer browser and have the website load.

What can I do to accomplish this?

share|improve this question

You can add an entry to your hosts file. I would recommend using something other than localhost if possible because I don't know what this will do to your system. You'll be trying this at your own risk I'm afraid.

For Windows, open notepad and open C:\windows\system32\drivers\etc\hosts. In there change the ip address of localhost to that of your OS X machine (If you're not on XP you'll need to run the command prompt elevated).

Then you should be able to run ipconfig /flushdns and give it a go in IE.


An alternative method (as your target is OS X) is to use some form of SSH and port forwarding. If you enable SSH access on your OS X box, and then run PuTTY on your Windows box there is an option to forward the port while you have a connection open. The source port wants to be 80 and then fill in the address of your OSX box below that and hit Add.

Screenshot of PuTTY dialog

share|improve this answer
    
Trying this now! :D – bobber205 Apr 27 '11 at 19:30
    
It's more like I need packets directed to 127.0.0.1 to go to 192.168.1.x – bobber205 Apr 27 '11 at 19:31
    
Added another technique to my answer – Matthew Steeples Apr 28 '11 at 5:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .