Virtual Hosts Basic

This page lists all defined virtual hosts. From here you can add/delete a virtual host or make changes to an existing one. Before you add a virtual host, make sure the virtual host root directory exists.

Table of Contents

Base

Virtual Host Name | Virtual Host Root | Config File

Connection

Max Keep-Alive Requests

Security

Follow Symbolic Link | Enable Script | Restrained | External App Set UID Mode | suEXEC User | suEXEC Group | External App Chroot Mode | External App Chroot Path | Total Output Bandwidth (KB/sec)

Virtual Host

Static Requests/Second | Dynamic Requests/Second | Outbound Bandwidth (bytes/sec) | Inbound Bandwidth (bytes/sec)

Virtual Host Name

Description

A unique name for a virtual host. It is recommended to use the virtual host's domain name as the Virtual Host Name. Virtual Host Name can be referred to using the variable $VH_NAME.

Virtual Host Root

Description

Specifies the root directory of the virtual host. Note: This is NOT the document root. It is recommended to place all files related to the virtual host (like log files, html files, CGI scripts, etc.) under this directory. Virtual Host Root can be referred to using the variable $VH_ROOT.

Syntax

An absolute path or a relative path to $SERVER_ROOT.

Tips

Place different virtual hosts on different hard drives.

Config File

Description

The configuration filename and directory for this virtual host.

Syntax

Filename which can be an absolute path or a relative path to $SERVER_ROOT, $VH_ROOT.

Tips

$SERVER_ROOT/conf/vhosts/$VH_NAME.xml is recommended for easy management.

Max Keep-Alive Requests

Description

Specifies the maximum requests that can be served through a keep-alive (persistent) connection. Connections will be closed once this limit is reached. You can specify a different limit for each virtual hosts. This number cannot exceed the server-level Max Keep-Alive Requests limit.

Syntax

Integer number

Tips

Set to a reasonably high value. A value of "1" or less will disable keep-alive connections.

See Also

Max Keep-Alive Requests

Description

Specifies whether to follow symbolic links in this virtual host. IF OWNER MATCH option will follow a symbolic link only if it has the same ownership. This setting overrides the default server-level setting.

Syntax

Select from drop down list

Tips

For better security, disable this feature. For better performance, enable it.

Enable Script

Description

Specifies whether scripting (non-static pages) is allowed in this virtual host. If disabled, CGI, FastCGI, LSAPI, Servlet engines and other scripting languages will not be allowed in this virtual host. Therefore, if you want to use a script handler, you need to enable it here as well.

Syntax

Select from radio box

Restrained

Description

Specifies whether files beyond this virtual host root($VH_ROOT) can be accessed though this web site. If set to Yes, only files under $VH_ROOT can be accessed and access to symbolic links or context pointing to files or directories beyond $VH_ROOT will be denied. This, however, does not limit the accessibility of CGI scripts. This is useful in the shared hosting environment. Follow Symbolic Link can be set to Yes to allow users to use symbolic links under $VH_ROOT, but not anything beyond $VH_ROOT.

Syntax

Select from radio box

Tips

Turn it on in the shared hosting environment.

External App Set UID Mode

Description

Specifies how user ID is set for an external application process. Three choices are available:

  • Server UID: Set the user/group ID of external application processes to the same as the server's user/group ID.
  • CGI File UID: Set the user/group ID of external CGI processes based on the user/group ID of the executable. This option only applies to CGI, not FastCGI or LSPHP.
  • Doc Root UID: Set the user/group ID of external application processes based on the user/group ID of the document root of the current virtual host.


Default value: Server UID

Syntax

Select from drop down list

Tips

In the shared hosting environment, it is recommended to use the CGI File UID or Doc Root UID modes to prevent files owned by one virtual host from being accessed by the external application scripts of another virtual host.

suEXEC User

Description

At the current context level, run as this user. If set, this value will override the Virtual Host level ExtApp Set UID Mode setting.

This configuration may be overridden at the External Application level using the Run As User setting.

Default value: Not Set

Syntax

Valid user name or uid.

suEXEC Group

Description

At the current context level, run as this group. Either suEXEC User at the Virtual Host level, or Run As User at the External Application level, must be set for suEXEC Group to take effect.

This configuration can be overridden at the External Application level using the Run As Group setting.

Default value: suExec User setting value

Syntax

Valid group name or uid

External App Chroot Mode

Description

Enterprise Edition Only Specifies how the root directory is set for an external application process. In order to protect confidential system data files from being accessed by a vulnerable external application script, an alternative root path can be set for the external application process so that files beyond the new root directory become inaccessible. This is referred to as a "chroot jail".

Three choices are available:

  • Same as Server: External application processes will be run in the same jail as the server.
  • Virtual Host Root: Set chroot jail to the root directory of the virtual host. The external application script will only be able to access files inside the virtual host root.
  • Customized Chroot Path: Specify the chroot path External App Chroot Path below.

Syntax

Select from drop down list

Tips

If used properly, chroot will greatly enhance the security of external application scripts, but you must make sure the external application script is functional in the limited chroot jail environment.

External App Chroot Path

Description

Enterprise Edition Only Specifies a new root directory for the current host's external application scripts when External App Chroot Mode is set to Customized Chroot Path.

Syntax

Absolute path

Total Output Bandwidth (KB/sec)

Description

Sets a limit for the total output bandwidth in KB/s for this virtual host. Once this limit is reached throttling will occur.

Static Requests/Second

Description

Specifies the maximum number of requests to static content coming from a single IP address that can be processed in a single second regardless of the number of connections established.

When this limit is reached, all future requests are tar-pitted until the next second. Request limits for dynamically generated content are independent of this limit. Per-client request limits can be set at server- or virtual host-level. Virtual host-level settings override server-level settings.

Syntax

Integer number

Tips

Trusted IPs or sub-networks are not affected.

See Also

Dynamic Requests/Second

Dynamic Requests/Second

Description

Specifies the maximum number of requests to dynamically generated content coming from a single IP address that can be processed in each second regardless of the number of connections established. When this limit is reached, all future requests to dynamic content are tar-pitted until the next second.

The request limit for static content is independent of this limit. This per client request limit can be set at server or virtual host level. Virtual host-level settings override server-level settings.

Syntax

Integer number

Tips

Trusted IPs or sub-networks are not restrained by this limit.

See Also

Static Requests/Second

Outbound Bandwidth (bytes/sec)

Description

The maximum allowed outgoing throughput to a single IP address, regardless of the number of connections established. The real bandwidth may end up being slightly higher than this setting for efficiency reasons. Bandwidth is allocated in 4KB units. Set to 0 to disable throttling. Per-client bandwidth limits (bytes/sec) can be set at the server or virtual host level where virtual host level settings override server level settings.

Syntax

Integer number

Tips

Set the bandwidth in 8KB units for better performance.

Trusted IPs or sub-networks are not affected.

See Also

Inbound Bandwidth (bytes/sec)

Inbound Bandwidth (bytes/sec)

Description

The maximum allowed incoming throughput from a single IP address, regardless of the number of connections established. The real bandwidth may end up being slightly higher than this setting for efficiency reasons. Bandwidth is allocated in 1KB units. Set to 0 to disable throttling. Per-client bandwidth limits (bytes/sec) can be set at the server or virtual host level where virtual host level settings override server level settings.

Syntax

Integer number

Tips

Trusted IPs or sub-networks are not affected.

See Also

Outbound Bandwidth (bytes/sec)