当前位置: 动力学知识库 > 问答 > 编程问答 >

http - SSH Port forwarding causes local browser to lose port qualifier?

问题描述:

We've set up port forwarding so that our users can access the web server on server foo through a SSH tunnel.

The port forwarding causes requests to 999 on the local machine to be forwarded to port 80.

On their own machine they open the SSH tunnell and then enter into their local browser ...

http://localhost:999/d/a.html

... on their local browser and their local browser receives the equivalent output to :

http://foo/d/a.html

This is all fine. However within a.html is a relative link to b.html (the link is just plain "b.html" - no virtual directory, no host name). The browser inteprets that link as being ...

http://localhost/d/b.html

... that is the port qualifier has been lost and so when the link is used instead of it going down the SSH tunnel the client machine attempts to resolve the address itself and finds it can't.

I assume this must be a common problem but how is it resolved ?

网友答案:

I'm answering my own question here. Based upon the above comments I've reviewed what's happening and it is (almost certainly) something unrelated to the tunnelling. Please ignore the question and thanks for your time.

分享给朋友:
您可能感兴趣的文章:
随机阅读: