NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXAMPLES | EXIT STATUS | ATTRIBUTES | FILES | SEE ALSO | NOTES
hthost is used primarily to add and delete web sites. The add subcommand associates a web site (or virtual host) with system resources, such as the server instance that hosts the site, a configuration directory, a configuration file, and a host name.
The enable and disable subcommands are used to activate or shut down web sites on a running server instance. The enabled or disabled state is saved so that if the server instance is restarted, enabled sites are automatically reactivated.
Once a web site has been created on a server instance, you must edit its configuration file to further customize the site; see httpd.site.conf(4).
Subcommands
The first argument to hthost must be one of the following subcommands:
Adds a web site configuration for a host name to a server instance. The add subcommand creates a site path for configuration directories, creates a configuration file, and grants administrative rights to the given user name and optional group. The initial state of the site is enabled.
Deletes a web site configuration from a server instance. References to the site in the configuration files for the server instance are deleted, and the site is no longer available through httpd. The site's directories and files remain in place.
Disables a web site. The server instance that serves the site will not respond to requests for disabled sites.
Enables a web site, making it available through the server instance.
Displays usage information for the command.
Lists the sites supported by a server or properties of a specific site. If only an instance name is supplied, a list of all web sites on that server displays. If an instance name and a hostname are supplied, then details about the web site for the host name are displayed.
Displays the version of the hthost command.
Subcommand Options
The following options are supported.
Specifies the location of the site configuration file relative to the site_path specified by -s. By default, site configuration is stored in the site_path/conf directory. Valid only with the add subcommand.
Specifies a group in the server administration realm that has ownership rights on the new site. Valid only with the add subcommand.
Specifies the host name of the site to which a subcommand applies. The host name is a token used to identify the site; no name service lookups are performed, for example, to expand a host name to a fully qualified domain name. Any form of the host name may be used for the add subcommand, but other commands must use the same form used when the site was added. Valid with all subcommands.
Specifies the server instance which hosts the web site. The instance name is defined uniquely for each server when it is created. Valid with all subcommands.
Specifies the absolute path to the web site's directory tree. The site_path contains all configuration, access control, realm, and content directories and files for the site. Valid only with the add subcommand.
Specifies a user in the server administration realm that has ownership rights on the new site. Valid only with the add subcommand.
A server administrator named serverAdmin1
creates a site named www.A.com. The site will have an administrator named user1
and have all configuration files and public documents in /opt/WWW/A.com/
.
In order for hthost to successfully create a directory for the new site, you must have write permission to the directory under which the site configuration files will reside.
# hthost add -i sws_server -h www.A.com -u user1 \\ -s /opt/WWW/A.com -f conf/A.com.httpd.conf -z serverAdmin1 Enter Password for serverAdmin1: Creating site directory: /opt/WWW/A.com Creating site configuration: /opt/WWW/A.com/conf/A.com.httpd.conf # ls /opt/WWW/A.com cgi-bin/ public/ conf/ servlets/
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Availability | SUNWhttp |
Interface Stability | Evolving |
The following files are used by this utility:
The web site configuration file.
The server instance configuration file. When hthost adds a new site, it creates an entry in httpd.conf to defined the site_path and web site configuration file.
If the command is run by root
user, then the username and password of an administrator are not required.
Users other than root
must use the -z option and pass the user name and password of a valid administrator to the command.
NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXAMPLES | EXIT STATUS | ATTRIBUTES | FILES | SEE ALSO | NOTES