Chapter 15: Shared Tomcat Hosting For the purposes
Chapter 15: Shared Tomcat Hosting For the purposes of providing a simple test example, create a sample HTML page named index.htmlin the document root of each of these domains. For example, the file /home/websites/europa.dom/web/ index.htmlshould contain the following HTML:
Welcome to Europa.dom s Apache hosted website Create a similar file as /home/websites/callisto.dom/web/index.html, and change europa.dom to callisto.dom. You also need to ensure that the domains europa.domand callisto.dom can be resolved by the client and the server machines. This should be done by setting up your DNS server entries for these hosts. DNS configuration is not covered in this chapter, although for testing purposes, you can edit the hosts file on the server and client machine, as shown, to get the same effect: For name-based virtual hosting, set europa.domand callisto.dom to the same IP address (here 192.168.1.2), and add the following line to your hosts file: 192.168.1.2 callisto.dom europa.dom For the IP-based virtual hosting example, change this so that the domains have different IP addresses (here 192.168.1.2 and 192.168.1.20): 192.168.1.2 callisto.dom 192.168.1.20 europa.dom Naturally, these need to be valid IP addresses for the server machine. The next section explains how you can get another IP address when your server machine has just one network card. IP -Based Virtual Hosting in Apache In IP-based virtual hosting, a machine is configured to have a number of IP addresses equal to the number of hosts it will serve. Therefore, a machine that is to host ten Web sites would need ten IP addresses configured. These additional IP addresses may be configured either by adding physical network interfaces (NICs) network cards to the machine, or, as is more common, by adding aliased network interfaces to the computer. Normally, when an NIC is added to a machine, it is configured with a single IP address, which is used by various services. However, it is possible to configure the same NIC with more than one IP address. Adding these additional IP addresses involves using operating system specific commands for first creating a virtual interface and then configuring it with a virtual IP address. This process normally involves using a physical NIC and adding virtual interfaces on top of it, a process also commonly known as aliasing.For high quality jboss hosting services please check jboss web hosting website.