Sun Java System Web Server 7.0 Update 4 Administrator's Guide

Use Cases

Server instances can have any number of HTTP Listeners, both secure and non-secure. You can have both IP-address-based and URL-host-based virtual servers.

Every virtual server can (but does not have to) have its own list of ACLs, its own mime.types file, and its own set of Java Web Applications.

This design gives you maximum flexibility to configure the server for a variety of applications. The following examples discuss some of the possible configurations available for Web Server .

Default Configuration

After a new installation of the Web Server , you have one server instance. This server instance has just one HTTP Listener listening on the port you selected during installation of any IP address to which your computer is configured.

Some mechanism in your local network establishes a name-to-address mapping for each of the addresses to which your computer is configured. In the following example, the computer has two network interfaces: the loopback interface (the interface that exists even without a network card) on address, and an Ethernet interface on address

The name is mapped to via DNS. The HTTP Listener is configured to listen on port 80 on any address to which that machine is configured ("ANY:80" or "").

In this configuration, connections to the following reach the server and are served by virtual server VS1

Use this configuration for traditional web server use. You do not need to add additional virtual servers or HTTP Listeners.

Secure Server

See Configuring SSL for the Server.

Intranet Hosting

A more complex configuration of the Web Server is one in which the server hosts a few virtual servers for an intranet deployment. For example, you have three internal sites where employees can look up other users’ phone numbers, look at maps of the campus, and track the status of their requests to the Information Services department. Previously (in this example), these sites were hosted on three different computers that had the names, and mapped to them.

To minimize hardware and administrative overhead, you can consolidate all three sites into one web server living on the machine You could set this up in two ways: using URL-host-based virtual servers or using separate HTTP Listeners. Both have their distinct advantages and disadvantages.

Intranet hosting using URL-host-based virtual servers

While URL-host-based virtual servers are easy to set up, they have the following disadvantages:

You can also set up the IP-address-based configuration with one HTTP Listener per address.

Intranet hosting using separate HTTP Listeners

The advantages of IP-address-based virtual servers are:

The disadvantages are:

Both configurations require setting up name-to-address mappings for the three names. In the IP-address-based configuration, each name maps to a different address. The host machine must be set up to receive connections on all these addresses. In the URL-host-based configuration, all names can map to the same address, the one the machine had originally.

The configuration with multiple HTTP Listeners may give you a minimal performance gain because the server does not have to find out the address where the request arrived. However, using multiple HTTP Listeners also results in additional overhead (memory and scheduling) because of the additional acceptor threads.

Mass Hosting

Mass hosting is a configuration in which you enable many low-traffic virtual servers. For example, an ISP that hosts many low-traffic personal home pages would fall into this category.

The virtual servers are usually URL-host-based. For example, you can have one configuration that enables only static content, and another one that enables static content and CGIs.