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 have a web server on my localhost on win-7,

and I want to route my local network ip: (192.168.1.120) to the localhost,

so that if I type http://192.168.1.120/ in my browser it would directly connect to the localhost, as if I typed http://127.0.0.1/

I tried to do it like this, in different variations:

route ADD 192.168.1.120 MASK 255.255.255.255 127.0.0.1

But it never worked of course...

Does anyone know the correct method?

share|improve this question
    
Would you not be better trying to get your webserver to listen on your local ip address rather than just listening on localhost? –  sgmoore Aug 18 '12 at 18:02
    
I did set my webserver to listen on 192.168.1.120 - but it still takes me long time to connect for some reason. But if I open my site as http://127.0.0.1 which is actually the same machine, it loads up in an instant. –  Anonymous Aug 18 '12 at 18:11
add comment

1 Answer

if you do a tracert of both the local IP address and localhost, you will see that there is only 1 hop, the machine itself.

So there is no need to do any routing.

Perhaps you arent explaining your question very well?

share|improve this answer
    
Well I've an apache web server on a local machine. And if I open my site as http://127.0.0.1/ it absolutely consistently opens it up in the very instant moment I hit the the enter. But if I type http://192.168.1.120/ which is my network address, or otherwise refresh some of the pages using that address, it waits for the browser to connect for some significant amount of time. If I do consequent requests though, eg immediately refreshing the page after first loading, it would then open quickly, but if I refresh after a minute or less it then gets me another 10 secs of waiting... –  Anonymous Aug 18 '12 at 18:08
    
It sounds like your webserver isnt configured properly. –  Keltari Aug 18 '12 at 18:12
    
It's a fresh install, but well, here is the config, which may reveal: pastebin.com/V0Z0qhJX –  Anonymous Aug 18 '12 at 18:19
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.