Sorry if the question is unclear. I have two sites which I would like to set up in Apache2 on Ubuntu Server. Both of them should be open to the public. I would like to set up a separate IP for each of them (which I already did). I set up my router so that it forwards requests on port 80 to one of the IP addresses. How can I configure my setup so there is a way to access the other IP address?
|
feedback
|
|
If you have a second public IP and a NAT router which can support either a range of public IP addresses or multiple IP addresses, otherwise most simple NAT routers can not. Most folks actually set up multiple "virtual domains" to host different web sites under the same IP/web server combination. | |||||||||||
feedback
|
|
You want Virtual Hosts. Essentially, the HTTP request made by the client includes the domain name of the site they're accessing. So the Apache server knows what content to serve them. --Christopher Karel | |||||||||
feedback
|
|
Along the line of the answers that have already been posted, and to keep it simple: In Linux I believe the parlance is Virtual Hosts, as Christopher posted in his answer. Essentially you run multiple web sites on one ip address and the web server sorts out which site the incoming connection is destined for. In Windows IIS parlance, you would set the ip based web site (the one with no domain) as the default web site on your server and you would create a second web site using host headers for the "named" web site to differentiate between the "named" web site and the "unnamed" web site. Your router would be configured to forward incoming HTTP connections on the one public ip address to the server, which would then handle the connection appropriately, based on whether the connection were meant for the "named" or unnamed" web site. You need to figure out if name-based virtual hosts and ip-based virtual hosts configurations can be "combined" on your web platform so that you can use both methods. | |||
feedback
|