Question When two sites hosted on the same server

brannsiu

Distinguished
Apr 20, 2013
1,064
3
19,285
For example, I have two websites which are for different purposes, each of them have the their own short url, but they are both hosted on the same server. Could someone who knows my first site be able to find out another site of mine which is hosted on the same server from the source code or any sophisticated skills / commands / techniques?
 
It depends on how you implemented it. This is done all the time by major hosting centers but they put a load balancer in front. Say you have xxx.xxx.com and yyy.yyy.com both mapped to the same ip address. All the traffic on the internet just uses the IP address. Inside the http headers your server can see which site is really being used and run different programs. Unless your program told the user about the other name there the user would not know about the other site.

Now if they really wanted to find this out since you must have the 2 sites domain mapped they might be able to get it via reverse dns lookup of the IP
 

brannsiu

Distinguished
Apr 20, 2013
1,064
3
19,285
It depends on how you implemented it. This is done all the time by major hosting centers but they put a load balancer in front. Say you have xxx.xxx.com and yyy.yyy.com both mapped to the same ip address. All the traffic on the internet just uses the IP address. Inside the http headers your server can see which site is really being used and run different programs. Unless your program told the user about the other name there the user would not know about the other site.

Now if they really wanted to find this out since you must have the 2 sites domain mapped they might be able to get it via reverse dns lookup of the IP

Thanks but excuse me, what did you mean by " Inside the http headers your server can see which site is really being used and run different programs"

I am not a programmer... Did you mean that an advanced and sophisticated someone (Neglect hackers) could be able to find out another site of mine from the one site already known to them?? Or Did you mean that only the admin of the web server will be able to know (But they should have already known)?
 
No way for me to say. If you did not program it then it depends on how it is written. If the user for example can just key in the IP address and the response from the server is to display a selection menu asking which server you mean then someone will see it. This is just one example it all depends on the details.

When you did not write it yourself and have no knowledge of how the software works this type of question is better asked of who ever supports the software.