Host

From CauchoWiki

Jump to: navigation, search


The <host> directive can use any Environment configuration item. The host is allowed in the <server> directive. The host configuration can occur in the <host> directive or in a <host-default> or <host-deploy> directive.

directivemeaningdefault
EnvironmentAny Environment configuration directive is allowed in the host
access-logHost-specific access logging
document-directoryA default document-directory for child web-appsoptional
ear-defaultDefault configuration for .ear files
ear-deployConfigures an .ear deployment directory
error-pageCustom error pages for unhandled error codes
host-aliasan alias virtual host name for this host
host-alias-regexpa regular expression of host name aliases for the host
host-namethe canonical host name
idconfigures the unique host identifier
regexpcreates virtual hosts based on a regular expression
rewrite-dispatchrewrites URLs and can redirect or return error codes
root-directoryspecifies the virtual hosts's root directoryrecommended
redeploy-modeconfigures the hot-deployment redeploy mode
startup-modeconfigures the hot-deployment startup mode
web-app-deployconfigures a web-app deployment directory (webapps)
web-app-defaultconfigures host-wide defaults for all web-applications
web-appdirectly configures child web-apps


<resin xmlns="http://caucho.com/ns/resin"
       xmlns:resin="http://caucho.com/ns/resin/core">
...
<server>
  ...
  <host host-name="www.foo.com"
        root-directory="/var/www/foo.com">
    <host-alias>foo.com</host-alias>
    <host-alias>web.foo.com</host-alias>

    <resin:import path="host.xml"/>

    <access-log path-format="logs/%Y-%m/access.log.%Y-%m-%d

    <web-app-deploy path="webapps"/>
  </host>
  ...
</server>
</resin>
Retrieved from "http://wiki.caucho.com/Host"
Personal tools