Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.