Virtual Host General
Table of Contents
Max Keep-Alive Requests | Enable Compression | Enable GeoLocation Lookup
Use Server's Log | File Name | Log Level | Rolling Size (bytes) | Keep Days | Compress Archive
Log Control | File Name | Piped Logger | Log Format | Log Headers | Rolling Size (bytes) | Keep Days | Compress Archive | Bytes Log
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
Enable Compression⇑
Description
Specifies whether to enable GZIP/Brotli compression for this virtual host. This setting is only effective when compression is enabled at the server level. Compression settings are configured at the server level (Tuning > GZIP/Brotli Compression).
Syntax
Select from radio box
See Also
Enable GeoLocation Lookup⇑
Description
Specifies whether to enable/disable IP Geolocation lookup. Can be set at server, virtual host, or context level. IP Geolocation is disabled by default when using value "Not Set".
Syntax
Select from radio box
See Also
Use Server's Log⇑
Description
Specifies whether to put log messages from this virtual host into the server log file instead of creating its own log file.
Syntax
Select from radio box
File Name⇑
Description
Specifies the path for the log file.
Syntax
Filename which can be an absolute path or a relative path to $SERVER_ROOT, $VH_ROOT.
Tips
Place the log file on a separate disk.
Log Level⇑
Description
Specifies the level of logging. Available levels (from high to low) are ERROR, WARNING, NOTICE, INFO, and DEBUG. Only messages with a level higher than or equal to the current setting will be logged. If you want to set it to DEBUG, you must set the server log level to DEBUG as well. The level of debugging is controlled solely at the server level by Debug Level.
Syntax
Select from drop down list
Tips
Unless Debug Level is set to a level other than NONE, DEBUG log level does not have any performance impact and is recommended.
See Also
Rolling Size (bytes)⇑
Description
Specifies when the current log file needs to be rolled over, also known as log rotation. When the file size is over the rollover limit, the active log file will be renamed to log_name.mm_dd_yyyy(.sequence) in the same directory and a new active log file will be created. The actual size of the rotated log file once it is created will sometimes be a little bigger than this size limit. Set to 0 to disable log rotation.
Syntax
Integer number
Tips
Append "K", "M", "G" to the number for kilo-, mega- and giga- bytes.
Keep Days⇑
Description
Specifies how many days the access log file will be kept on disk. Only rotated log files older than the specified number of days will be deleted. The current log file will not be touched regardless how many days worth of data it contains. If you do not want to auto-delete stale and very old log files, set this to 0.
Syntax
Integer number
Compress Archive⇑
Description
Specifies whether to compress rotated log files in order to save disk space.
Syntax
Select from radio box
Tips
Log files are highly compressible and this is recommended to reduce disk usage for old logs.
Log Control⇑
Description
Where the access log should be written. There are three options:
- Write to the server's access log
- Create an access log for this virtual host
- Disable access logging
Syntax
Select from drop down list
File Name⇑
Description
The access log filename.
Syntax
Filename which can be an absolute path or a relative path to $SERVER_ROOT, $VH_ROOT.
Tips
Put the access log file on a separate disk.
Piped Logger⇑
Description
Specifies an external application that will receive the access log data sent by LiteSpeed through a pipe on its STDIN stream (file handle 0). When specified, the access log will be sent to the logger application instead of the access log file specified in previous entry.
LiteSpeed load balancer performs simple load balancing among multiple logger applications if more than one instance of a logger application is configured. LiteSpeed Web Server always attempts to keep the number of logger processes as low as possible. Only when one logger application fails to process access log entries in time will the server attempt to spawn another logger application instance.
If a logger process crashes, the server will start another instance but the log data in the stream buffer will be lost. It is possible to lose log data if external loggers cannot keep up with the speed and volume of the log stream.
File path to the logger application should be given here, and optionally, the number of application instances can be set before the file path, followed by '|'.
Syntax
[<intances>|]<path_to_logger_app>
Example
tells the server to start up to 4 logger processes.
/path/to/logger/app
tells the server to start only one logger process.
Log Format⇑
Description
Specifies the log format for the access log. When log format is set, it will override the Log Headers setting.
Syntax
String. The syntax of log format is compatible with Apache 2.0's custom log format.
Example
"%h %l %u %t \"%r\" %>s %b"
Common Log Format with Virtual Host
"%v %h %l %u %t \"%r\" %>s %b"
NCSA extended/combined log format
"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"
Log cookie value of Foobar
"%{Foobar}C"
See Also
Log Headers⇑
Description
Specifies whether to log HTTP request headers: Referer, UserAgent, and Host.
Syntax
Select from checkbox
Tips
Turn this off if you do not need these headers in the access log.
See Also
Bytes Log⇑
Description
Specifies the path to the bandwidth bytes log file. When specified, a cPanel compatible bandwidth log will be created. This will log the total bytes transferred for a request including both the request and reply bodies.
Syntax
Filename which can be an absolute path or a relative path to $SERVER_ROOT.
Tips
Put the log file on a separate disk.
Customized Error Pages⇑
Description
Whenever the server has a problem processing a request, the server will return an error code and an html page as an error message to the web client. Error codes are defined in the HTTP protocol (see RFC 2616). LiteSpeed Web Server has a built-in default error page for each error code, but a customized page can be configured for each error code as well. These error pages can be even further customized to be unique for each virtual host.
Error Code⇑
Description
Specifies the HTTP status code for the error page. Only the selected HTTP status code will have this customized error page.
Syntax
Select from drop down list
Custom Error Message⇑
Description
Specify a custom error message.