1

Preliminary note: our DNS service is down, and I have no access to the website settings; I am just a team member trying to help people who need the website right now.

Four websites share the same IP address. When I type this IP address into my browser, only one website appears.

How I can try to figure out 'numerical' addresses of each website?

Should I try different port numbers such as 123.45.67.89:8080 etc? If yes, which port numbers I should try first?

Thank you very much in advance.

updated: the web server is nginx

3 Answers 3

4

The name to IP address mapping is in DNS and the name to webhost mapping is in the nginx config. You could connect to the different websites by putting the name of the site along with the server's IP address in your /etc/hosts file (C:\Windows\System32\Drivers\etc\hosts) so that you pass the right Host: header and nginx can route you to the right webroot.

If that doesn't cover your question then I'm not sure what you are asking.

5
  • I am only a user of a website, having no access to the server settings (only admin privileges on phpBB and WordPress, doesn't help much). I am trying to reverse-engineer where vhost directories of our nginx server could be located, so that I can tell our users which alternative addresses they should use when our DNS is down. The owner of the website keeps silence for now.
    – sdk
    Aug 30, 2011 at 20:01
  • You can tell them the IP address of the server so they can add a name to IP mapping in /etc/hosts on their workstation to gain access but the important thing will be to get DNS back up so you have automated name to IP mappings. That's the only thing you need, working name to IP mapping.
    – mtinberg
    Aug 30, 2011 at 20:04
  • The problem is that the same IP address is shared by all websites. Indeed, by changing /etc/hosts we make it easier to access the main website. Still, it doesn't resolve the problem with the remaining three (that have the same IP address).
    – sdk
    Aug 30, 2011 at 20:09
  • In your case, the answer is manually edit the host file as mentioned above until your DNS service is back up. When your computer does name resolution, it will check your host file before querying a DNS server. In this case where there is no DNS server available, edit the host file with the appropriate IP. So when they type whateveraddress.com in their browser, it makes the interpretation to an IP address, it send the data to that computer, and then the web server will handle the rest like normal.
    – Safado
    Aug 30, 2011 at 20:17
  • Yes it does resolve the problem of accessing the remaining three sites on the same IP as you can have multiple names pointing to the same IP. /etc/hosts is the name to IP mapping service that existed before DNS and you can use it just as it was before DNS was invented.
    – mtinberg
    Aug 30, 2011 at 20:21
2

This is called Virtual Hosting. The web server (apache ?) listens on one IP addresses, and depending on the domain name (the HOST header of the HTTP request), will return a different page.

So, from the information you gave here, I would say that it is not possible to connect to a particular website using a particular IP. All websites share the same IP, and the web server does the routing.

Check the web server configuration.

1
  • I have no access to the server configuration but it's nginx.
    – sdk
    Aug 30, 2011 at 19:43
1

What web-server are you using?

Trying different port numbers will be completely trivial and you'll waste the day away by trying. The reason a web server can have multiple websites on a single IP is because it's using virtual hosts. You need to figure out what your web server is, and then you're ability to figure out the addresses becomes MUCH easier. Your web server configuration should have all this information.

For instance, a website for an Apache website might be xxx.xxx.xxx.xxx/~foldername whereas for IIS it might be http://xxx.xxx.xxx.xxx/aliasname.

1
  • Do you have any access to the server at all? If you can figure out what their home directories are then it shouldn't be too hard to figure out what the vhost directories are.
    – DKNUCKLES
    Aug 30, 2011 at 19:50

You must log in to answer this question.

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