Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am attempting to access by its IP address. However, both and give a Server Error : 404.

I get the same problem if I do ssh -L * me@myremotehost and then navigate to localhost:8080 (this works fine for Google and a couple of other random sites I tried).

Could someone please explain what is going on here? A solution would also be much appreciated.

Edit: As per Kyle Jones' answer, apparently this is caused by not including the (desired) domain name info in HTTP host header as needed by the server to disambiguate and give me the result I want.

Is there some way I can make sure that the header contains what I want it to in both use cases?



Non-authoritative answer:    canonical name =


host is an alias for has address

host has address mail is handled by 30 mail is handled by 10 mail is handled by 20 mail is handled by 20 mail is handled by 30
share|improve this question

1 Answer 1

up vote 2 down vote accepted

An IP address is not necessarily unique to a specific Web site.

For many years Web providers have been using the HTTP 1.1 Host header to distinguish web sites and serve multiple web sites from a single IP address. Your web browser sends a Host header to the Web server telling it the domain name of the site you requested, and the server responds with the correct page. If you give an IP address only, the server has no way to determine which site (among the possibly many behind the IP address) you want. In this situation some sites return a generic page, and some return an error code to the browser.

I think you will have to add an entry for to /etc/hosts (or whatever equivalent static host table your system supports) that points to Then you can use to reach the local endpoint of your tunnel and a Host header with the correct domain will be sent through the ssh tunnel and on to the AWS server. I tried this here and it worked for me.

share|improve this answer
Is there a way to send the host header when using ssh? Or along with the IP, for that matter? (Yes, I guess I am talking about forging the header in some way, at least in the latter case...) –  Iskar Jarak May 10 '12 at 4:01
@Iskar I edited the answer to address that. –  Kyle Jones May 10 '12 at 6:09
I will accept later today once I have a chance to test it myself. Please excuse the paranoia. –  Iskar Jarak May 10 '12 at 23:17

Your Answer


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.