## OpenLiteSpeed Web Server Users' Manual

### Version 1.7 — Rev. 12

- License
- Introduction
- Installation
- Administration
  - Service Manager
- Security
- Configuration
  - Server General
  - Server Log
  - Server Tuning
  - Server Security
  - External Apps
  - Fast CGI App
  - Fast CGI Authorizer
  - LSAPI App
  - Servlet Engine
  - Web Server
  - Piped logger
  - Load Balancer
  - Script Handler
  - App Server Settings
  - Module Configuration
  - Listener General
  - Listener SSL
  - Virtual Host Templates
  - Virtual Host Basic
  - Virtual Host General
  - Virtual Host Security
  - Virtual Host SSL
  - Rewrite
  - Context
  - Static Context
  - Java Web App Context
  - Servlet Context
  - Fast CGI Context
  - LSAPI Context
  - Proxy Context
  - CGI Context
  - Load Balancer Context
  - Redirect Context
  - App Server Context
  - Module Handler Context
  - Web Socket Proxy
- Web Console
  - Admin Console General
  - Admin Console Security
  - Admin Listener General
  - Admin Listener SSL

# 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

### 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. The configuration file must be under the $SERVER_ROOT/conf/vhosts/ directory.

#### Syntax

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

#### Tips

$SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf is recommended

### 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

### Follow Symbolic Link⇑

#### 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

### 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)