Chapter 15: Shared Tomcat Hosting . The FQDN of the Web site can be used in place of the IP address in the directive. In this case, there should not be any problems in the DNS resolution of the host names in the machine. This is because when Apache starts up, it resolves each of the FQDNs in its directives to their IP addresses before offering the Web service. Problems in resolving these addresses (for example, when a DNS server cannot be reached in time) during startup can cause Apache to abort prematurely. Name-Based Virtual Hosting in Apache While IP-based virtual hosts help maximize the use of resources, they are still not feasible in places where hundreds of domains must be hosted on the same machine. Obtaining one IP address for each host or configuring many network interfaces on the same machine becomes a logistical nightmare. In these cases, name-based virtual hosting can be used. Name-based virtual hosting depends solely on an extension to the HTTP protocol. In an HTTP 1.0 protocol, a Web client or a browser merely had to make a TCP connection to port 80 of a Web server and request a document using a relative location identifier in order for the Web resource to be fetched. For example, to access the document http://europa.dom/index.html, the browser could look up the IP address of europa.dom, make a TCP connection to port 80 of the IP address, and get the complete resource just by using the HTTP GET command, as shown here: $ telnet 192.168.1.2 80 Trying 192.168.1.2… Connected to 192.168.1.2. Escape character is ^] . GET /index.html HTTP/1.0 The response from the server would look as follows: HTTP/1.1 200 OK Date: Fri, 23 Feb 2007 07:38:44 GMT Server: Apache/2.2.4 (Unix) mod_jk/1.2.20 Last-Modified: Fri, 23 Feb 2007 05:54:33 GMT ETag: 10c07d-93-6d00d840 Accept-Ranges: bytes Content-Length: 147 Connection: close Content-Type: text/html [… Rest of the contents of index.html] However, this enables only one Web site to be accessed per IP address; otherwise, it would be impossible to discover the host for which the request was intended. To tackle this problem, the Host: header, as introduced in HTTP 1.1, is used to determine the Web site from which the resource is requested. This header has been implemented by many HTTP 1.0 clients, too. With this new header, the HTTP headers exchanged between an HTTP/1.1-compliant Web client and a server would look like the following from the client: GET /index.html HTTP/1.0 Host: europa.dom
If you looking for unlimited one inclusive web hosting plan please check web hosting plan website.
This entry was posted
on Monday, September 21st, 2009 at 12:34 am and is filed under tomcat.
You can follow any responses to this entry through the RSS 2.0 feed.
Responses are currently closed, but you can trackback from your own site.