Administering virtual hosting
Use the INQUIRE HOST command and the virtual host browsing commands to see the virtual hosts that CICS® creates from your URIMAP definitions. Use the SET HOST command to change their status.
Each URIMAP definition that you set up for CICS as an HTTP server (with USAGE(SERVER) in the URIMAP definition) includes the host name that the web client is expected to supply in its request. CICS automatically creates virtual hosts for you, by grouping together into a single data structure all the URIMAP definitions in a CICS region that specify the same host name and the same TCPIPSERVICE definition. URIMAP definitions that specify no TCPIPSERVICE definition, and therefore apply to all of them, are added to all the data structures that specify a matching host name, so these URIMAP definitions might be part of more than one data structure. Each of these groups of URIMAP definitions then forms a virtual host that can be managed as a single unit.
- The INQUIRE HOST command, to inquire on the status of a virtual host. The command tells you the host name of the virtual host, the TCPIPSERVICE definition with which it is associated (or if it is associated with every TCPIPSERVICE definition in the CICS region), and whether it is enabled or disabled.
- The SET HOST command, to set the status of a virtual host to enabled or disabled. Disabling a virtual host stops applications from accessing all the URIMAP definitions that make up the virtual host. (However, note that a URIMAP definition that has been disabled in this way cannot be discarded.) When a virtual host is disabled, CICS returns an HTTP 503 response (Service Unavailable) to the web client.
- The virtual host browsing commands, to browse the virtual hosts in the CICS system.
CICS automatically deletes virtual hosts if all the URIMAP definitions that made up the virtual host have been deleted. You might not want to manage the virtual hosts that CICS has created for you. In that case, you can ignore them and manage at the level of your URIMAP definitions.
You can also process virtual hosts using an analyzer program. The host name for an HTTP request is passed to the analyzer program, and you can code the program to provide a host-dependent response to the request. However, if you set up virtual hosts in this way, you cannot manage them with the INQUIRE HOST, SET HOST, and virtual host browsing commands.