vhttpd OS/Resource Settings

These vhttpd.conf settings control various operating-system options or resource limits.

User user
Default: %TEXISOWNER%
Sets the user to access files and run scripts/programs as. It is important that this be a non-root user to help prevent security violations such as reading protected files, etc., as the web server generally must be started as root (to bind to port 80). This should be the same low-permissions user that Texis was installed as, so databases can be accessed by Vortex URLs.

In versions after 5.01.1170498000 20070203, the default is the special token %TEXISOWNER%, which means the owner of the texis executable in the install directory. This avoids the need to separately configure the User after setting the proper owner of Texis files at installation. %TEXISOWNER% will not allow the user to be root, if that is the texis owner for some reason. In previous versions, %TEXISOWNER% was not supported, and the default user was nobody.

Group group
Default: User's group
Set the group to access files and run scripts/programs as.

ServerName hostname
Default: gethostname() value
Set the hostname to report in the $SERVER_NAME environment variable to CGI and Vortex scripts.

Listen [address:]port
Default: *:80
Local port and optional IP address to listen for web requests on. The address, if given, is separated from the port with a colon; an IPv6 address (but not the port-separator colon) must be in square brackets. If only a port is given, the address defaults to *, which listens on all local IPv4 (and IPv6, if version 8+ and OS supports IPv6) addresses. Listen may be given multiple times to listen on multiple ports and/or addresses. Added in version 8.

BindAddress address|hostname

Note: this setting is deprecated and will become unsupported in a future release. Use Listen instead, which overrides BindAddress and Port.

Local address or hostname to listen for web requests on. There is no default in version 8 and later; the Listen default applies instead.

Port number

Note: this setting is deprecated and will become unsupported in a future release. Use Listen instead, which overrides BindAddress and Port.

TCP port number to listen on. There is no default in version 8 and later; the Listen default applies instead.

Timeout seconds
Default: 300
Maximum time in seconds to read/write data from/to a client. (The timeout set with this setting does not apply to server-run Vortex scripts once they start, where the script timeout is used instead.)

MaxBacklog number
Default: 1024 or the OS limit
Maximum pending-connections backlog to allow; further requests will be refused or ignored depending on the OS.

MaxClients num
Default: 32
Allow at most num simultaneous connections (clients) to the server. When the limit is exceeded, an error will be noted in the log, and further connections will be ignored until some current connection(s) are completed.

The MaxClients setting allows a server to deal with an overload from too many connections in a controllable manner. Instead of allowing ever more connections and slowing further, possibly taking the machine down, it waits for resources to become available. A proper value for a given configuration depends on numerous factors, such as the load from individual scripts, available RAM, the hardware, OS etc. It is generally determined from experimentation. Too low a value will unnecessarily delay clients and show errors in the log. Too high a value may not allow the server to recover from a heavy load or a malicious client.

MaxRequestHeaderSize num
Default: 65536
Accept at most num total header bytes - request line plus request headers - from a client request. Exceeding this limit will log an error and return a 413 (Request Entity Too Large) error to the client. Added in version 7.00.1373329000 20130708. This limit is to help prevent broken or malicious clients from consuming too many server resources.

PassEnv var [var ...]
Default: unset
Pass the named environment variables from the server's environment to CGI and VortexPath environments. Typically used to pass things like LD_LIBRARY_PATH for CGIs using shared libraries, since the default CGI environment is restricted. Use caution to avoid passing secure information to insecure scripts. Added in version 3.0.948500000 20000121.

SetEnv var value
Default: unset
Set the given variable to the given value in the environment for CGI and server-run (VortexPath) scripts. Use caution not to pass secure information to insecure scripts, or overwrite standard CGI variables like PATH_INFO. Added in version 3.0.948500000 20000121.

UnsetEnv var [var ...]
Default: unset
Unset (remove) the given variable from the environment for CGI and VortexPath. Use caution not to delete standard CGI variables like PATH_INFO. Added in version 3.0.948500000 20000121.

BadContentLengthWorkAround int
Default: 1
If bit 0 is set, work around issue with some browsers that send extra unexpected data beyond Content-Length. This data is not normally read, so the server's socket close at transaction end causes a connection-reset to the browser, and the browser displays an error page. The problem often appears on large POST-data pages. If bit 1 is set, log the event. Added in version 5.01.1159494272 20060928.

LogEmptyRequests boolean
Default: off
If true, empty HTTP request lines from clients (zero bytes read) will be logged to the error log. The default is off, as these connections are usually benign unused connections from browsers. No transfer log entry can be made, as there is no HTTP request. Added in version 7.00.1350603750 20121018.


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.