http://www.aaa.com:8080/web1
http://www.bbb.com:8080/web2
http://www.ccc.com:8080/web3
Therst URL is mapped to virtual host www.aaa.com, the second URL is mapped to virtual host
www.bbb.com,and the third is mapped to virtual host www.ccc.com.
Onthe other hand, the following URL results in a 404 return code, because web3 isn’tregistered
withwww.bbb.com:
http://www.bbb.com:8080/web3
Forthis mapping to work, make sure that www.aaa.com,www.bbb.com, and www.ccc.com all
resolveto your physical server’s IP address. They need to be registered with the DNS server for
yournetwork. In addition, on a UNIX system, add these domains to your /etc/hosts le(if the
settingfor hosts inyour /etc/nsswitch.conf leincludes files).
Whenthe Enterprise Server is started, it starts the following virtual servers automatically:
Avirtual server named server, which hosts all user-dened web modules
Avirtual server named __asadmin, which hosts all administration-related web modules
(specically,the Admin Console). This server is restricted; you cannot deploy web modules
tothis virtual server.
Fordevelopment, testing, and deployment of web services in a non-production environment,
serveris often the only virtual server required. In a production environment, additional virtual
serversprovide hosting facilities for users and customers so that each appears to have its own
webserver, even though there is only one physical server.
HTTP Listeners
Eachvirtual server provides connections between the server and clients through one or more
HTTPlisteners. Each HTTP listener is a listen socket that has an IP address, a port number, a
servername, and a default virtual server.
HTTPlisteners must have a unique combination of port number and IP address. For example,
anHTTP listener can listen on all congured IP addresses on a given port for a machine by
specifyingthe IP address 0.0.0.0. Alternatively, the HTTP listener can specify a unique IP
addressfor each listener, but use the same port.
Sincean HTTP listener is a combination of IP address and port number, you can have multiple
HTTPlisteners with the same IP address and dierent port numbers (for example, 1.1.1.1:8081
and1.1.1.1:8082), or with dierent IP addresses and the same port number (for example,
1.1.1.1:8081and 1.2.3.4:8081, if your machine was congured to respond to both these
addresses).
HTTPListeners
SunGlassFishEnterprise Ser ver2.1 Administration Guide December 2008150