Toolserver:Admin:Sun Java System Web Server

Sun Java System Web Server is the HTTP server we use everywhere except Subversion and wolfsbane. (Subversion uses Apache, while wolfsbane uses ZWS.)


 * Sun Java System Web Server documentation

Sun Web Server divides the server into three components: configurations, instances and virtual hosts.

A configuration describes the entire server, containing instances and virtual hosts. Usually there is only one configuration for each server.

An instance is one running instance of a server. A instance contains virtual hosts and listeners. Most of our servers only have one instance.

A virtual host is one (or more) hostnames, with its own document directories, content rules, etc.

A listener is an HTTP listener that listens on a particular host or port. Listeners can be associated with one or more virtual hosts.

Three ways are available to configure web server: the web interface, the command line interface, and editing the configuration files. For the web interface and the command-line interface, you can authenticate using your LDAP username and password.

Installation details
This documentation assumes the webserver is installed in /opt/webserver7, which is the default path. However, on the HA cluster, it is installed in /global/misc/www/webserver7.

The instance path is usually underneath the installation path, and is named https-instancename, e.g. /opt/webserver7/https-web for the web instance on amaranth.

Editing the configuration files
The web server configuration files are located in /config. After editing them, call /bin/reconfig to reload the configuration.

Using the web interface
The web interface is the easiest way to configure Web Server. However, it's not as flexible as the command-line interface.

Access the web interface at ; for amaranth, that would be.

Using the command-line interface
The "wadm" tool can be used to configure the web server. Start it like this:

Please enter admin-user-password> Connected to localhost:8989 Sun Java System Web Server 7.0U1 B06/12/2007 21:15 wadm>
 * 1) /opt/webserver7/bin/wadm \--user=

Type for help.

As root on the web zone on amaranth, you can use the wadmcmd script (located in /opt/local/bin/wadmcmd). It uses the webadmin user and requires no password. Use it like this: {panel} wadmcmd _command_ {panel}

Useful wadm commands can be found in the manual: Sun Java System Web Server 7.0 CLI Reference Manual. Some examples:
 * get-perfdump: fetch performance statistics
 * service-dump: fetch accumulated service statistics
 * get-config-stats: get statistics for the config

Restarting the service
The webserver usually runs from SMF:

% svcs http STATE         STIME    FMRI disabled      Jan_07   svc:/network/http:apache2 disabled      Jan_07   svc:/network/http:https-amaranth disabled      Jan_09   svc:/network/http:admin-server online        Feb_13   svc:/network/http:https-web % svcadm disable http:https-web % svcadm enable http:https-web

However, on the HA cluster, it is controlled by the cluster software.

% clrg offline www % clrg online www