Domain – Serve multiple servers from same ip address

domaindomain-name-systemip

I saw other questions about this that were similar, but not exact.

So, my issue is, I have a home server that hosts my website and uses my outside ip. Well, rather my domain name directs to that ip. I have a second computer that I would like to run a webserver on as well. The only way I could think of to do this was to use a different port and still access my domain. Do, www.mydomain.com would take me to my main site, but www.mydomain.com:8080 would take my to my second computer that his hosting a site.

Does this make sense? It is this possible since these are different computers and I really only have 1 ip.

I think I could make a subdomain like sub.mydomain.com but not sure if this would help.

Thanks.

Best Answer

yes, you can run a separate website on a different port. But as far as having a subdoamin, it wont really matter because a domain can only point to an ip address, not an ip address + port. By default web sites use port 80:

http://domain.com is the same as http://domain.com:80

so if you have a subdomain and you run a website on a different port, you're gona have to specifiy the port with it, i.e. http://sub.domain.com:8080

Related Topic