Apache Virtual Server Options
As admin, you can view and change Apache webserver virtual host settings for your domains, such as filters,
error handling, mime types, document options.
To view and change virtual server options under the domain admin:
- Select Apache webserver in the System Monitor section of the left panel in your admin CP+.
- In the Virtual Servers list choose necessary server.
- On the page that shows there is a range of virtual server options that are subject to changes:

- Processes and Limits option sets many of the limits for Apache.
- Networking and Addresses option configures the network addresses and ports where Apache will listen.
- Log Files option allows to keep track of servers' actions and operations.
It can log information to a separate file and in a custom format.
- Document Options allow to specify your site's Document root - the path
to the directory containing your web pages.
- MIME Types option sets a standard method of determining data type for many types of network connection.
- Error Handling option allows to configure the error types that you want to provide with custom messages.
- User and Group option allows to configure the user and group under which the Apache server will run.
- Aliases and Redirects option allows configuring directory aliases and URL redirects for the server.
- CGI programs option allows setting CGI directory aliases and other CGI-related features.
- Directory Indexing allows setting directory index options, files, default icon etc
- Proxying allows to set proxy server options.
- SSL Options allows setting SSL off/on, set private key file, SSL log file etc.
- PHP allows setting PHP Configuration values.
- Automatic Virtual Hosts allows setting automatic virtual hosts for server.
- Filters : set input and output filters, apply them for all files.
- Languages option allows setting language and character set for the virtual website.
- Image Maps allows setting default base and action for image maps.
- Show Directives option sets the appearance and information contained in Apache-generated indexes.
Processes and Limits
In most cases, the defaults set for processes and limits are pretty suitable, but sometimes you may want
to change them due to high load or low memory situations.
Click the Processes and Limits icon and you will see the following page:

- Maximum Request Body size: enter custom length of your request in bytes, if necessary.
- Memory resource limit: set the maximum memory in bytes used by a process
- CPU Resource limit: configure the maximum CPU time in seconds used by a process.
CPU resource limits are expressed in seconds per process.
- Process limit: a number of simultaneous Apache processes.
Make sure to click Save to preserve changes.
Networking and Addresses
This section allows configuring the network addresses and ports where Apache will listen, and some other access limits.
Click the Networking and Addresses icon and you will see the following page:

- Lookup hostnames: if it's checked, it will resolve hostnames to your connections.
- Server Admin Email Address: enter administrator's email, if necessary.
- Use hostname supplied by browser: choose "no" if you yes if you want to avoid false requests on your web server.
- Do RFC1413 user lookups: this option allows to retrieve user names from a remote system using the
protocol described in RFC 1413.
- Server hostname: enter specific server hostname, if necessary.
Make sure to click Save to preserve changes.
Log Files
Log files help to keep track of the activity and performance of the server. Errors and accessed pages are written
by Apache into a journal that is managed by the Log Files option of the virtual server.
Click the Log Files icon and you will see the following page:

- Error log to: you can choose where you want the logs to be written: system log, file or program.
- Error log level: choose which level of the logs you want the system to write from the drop-down box.
Make sure to click Save to preserve changes.
Document Options
This option gives an access to many of the virtual server specific options that will effect permissions, locations, and behaviors.
Click the Document Options icon and you will see the following page:

- Document root directory: the path to the directory that contains your web pages.
- Per-directory options file: specify a filename to be checked for directory access options.
- Directory options: you can choose to use default options for this directory or choose from the selected options.
It will effect the root directory for your virtual server and all subdirectories.
- Generate MD5 digests: turn on generation of Content-MD5 digest headers.
With this option enabled, Apache generates a message digest, or fingerprint, for each static page served.
- Virtual server path: leave at default. If necessary, provide a path from the default server to each virtual server.
- Error message footer: optionally, you can add a footer to all server generated documents (such as error pages and etc.).
Make sure to click Save to preserve changes.
MIME Types
The MIME types take care of file associations and char sets in Apache.
You can set up which command will be executed when a request is made for certain file types.
Click the MIME Types icon and you will see the following page:

Default MIME type: use default MIME type or add new MIME type in the field.
Make sure to click Save to preserve changes.
Error Handling
The Error Handling section allows to specify which web page is called when some specific error takes place upon request.
For instance, if a requested web page is not found, Apache displays a 404 error.
Click the Error Handling icon and you will see the following page:

- Error code Response: enter a code that corresponds to an error and choose the response to the error: URL or a message.
- URL or message: due to the chosen error response, enter either a URL or a message into this field.
Make sure to click Save to preserve changes.
User and Group
The User and Group option allows you to specify which user owns the Apache processes corresponding to the current virtual server.
Click the User and Group icon and you will see the following page:

- Run as Unix user: set User name or User ID in this section.
- Run as Unix group: set Group name or Group ID in this section.
Note: good choice is to configure it to 'nobody' and 'nogroup', as they do on many UNIX operating systems.
Don't set this to 'root' unless you are absolutely sure what you need it for and if you are aware of the security implications of doing so.
Make sure to click Save to preserve changes.
Aliases and Redirects
The Aliases and Redirects options allow you to manipulate and
control URLs as requests incoming to the server.
Click the Aliases and Redirects icon and you will see the
following page:

- Document directory aliases: if your documents are stored in
definite directory (other than DocumentRoot), you can use this setting
to reduce the link to the target directory. Specify the alias you wish in the "From" field and the real path to the directory in the local filesystem in the "To" field.
- Regexp document directory aliases: this setting allows you
to set aliases for several directories of the same type simultaneously using standard regular expressions
- URL redirects: if some of requested resources were moved, you can use this setting to map an old URL to a new one. The old URL-path must be specified in the "From" field. Any request for documents beginning with this path will be redirected to a new URL - in the "To" field. Also you can set the status parameter in the "Status" field (if this argument is not given, the redirection will be "temporary"). To do it you should use corresponding HTTP status codes, in particular, the following:
301 corresponds to a permanent redirect status (the resource has moved permanently)
302 corresponds to a temporary redirect status (default)
303 corresponds to a "See Other" status (the resource has been replaced)
410 corresponds to a "Gone" status (the resource has been permanently removed; in this case the "To" field must be omitted)
- Regexp URL redirects: this setting allows you to redirect several URLs of the same type simultaneously using standard regular expressions
- Permanent URL redirects: you can use this setting in case if the requested resource has been moved permanently
- Temporary URL redirects: you can use this setting in case if the requested resource has been moved temporarily
- Map local to remote URL: due to this setting some requests arriving to the local server can be converted into the requests to a remote sever.
- Map remote Location headers to local: this option is used in conjunction with the previous one; it allows to map remote servers to local address imperceptibly for the observer .
Make sure to click Save to preserve changes
CGI Programs
This section is to adjust your web-server interaction with CGI programs.
Click the CGI Programs icon and you will see the
following page:

- CGI directory aliases: this setting works in the same way as Document directory aliases setting in the previous section, but
it also marks the target directory as containing CGI scripts.
- Regexp CGI directory aliases: you can use this setting if you need to
set aliases for several CGI directories with similar names, using standard regular expressions.
- Handler or MIME type CGI actions: this option lets you activate CGI scripts as soon as a request for the file of certain type is arrived to the server;
you should specify either a MIME content type or a handler and the URL-path to a resource that has been designated as a CGI using one of the previous options.
- HTTP method CGI actions: you can use this option to activate the CGI-script when the file is requested using some HTTP method; just choose one of HTTP methods from the drop-down box and set the URL-path to the CGI-script.
- Environment variables for CGI scripts: this setting is used to define and control environment variables that will be provided to CGI scripts; specify the name of the variable in corresponding field and choose its value:
"Pass through" means that this variable passes to the CGI scripts from the environment of the shell which invoked the httpd process;
"Clear" means that this variable is removed from those passed on to CGI scripts;
"Set to..." - in this case you can set definite value for this variable, which is then passed on to CGI scripts.
- Process includes on files with execute bit?: this option controls the parsing of ordinary html documents;
choose "No" to set no special treatment of executable files
if you choose "Yes", then any text/html file with the user-execute bit will be treated as a server-parsed html document
if you choose "Yes and set last-modified date", then the file with the user-execute bit not only will be treated as a server-parsed html document, but also the last-modified date will be set (in case if this file contains the group-execute bit).
- Variables set based on browser type: this option allows to set environment variables depending on client's browser type; in the "Browser regex" field you should specify the browser type pattern using standard regular expressions, then indicate, if it's a case sensitive; enter the variable name in the "Set variable" field and set its value.
- Variables set based on request headers: this option allows to set environment variables depending on attributes of the request; in the "Header" field you should specify the attribute of the request, in the "Match" field - the standard regular expression,then indicate, if it's a case sensitive; enter the variable name in the "Variable" field and set its value.
Make sure to click Save to preserve changes
Directory Indexing
This section allows setting directory index options, files, default icon etc.
Click the Directory Indexing icon and you will see the
following page:

- Directory index options: you can choose default setting or select options from the list below to specify the behavior of the directory indexing :
Display fancy directory indexes - if enabled, the column headers
are links that control the order of the display
Display HTML title as description - if enabled, the title will be extracted from the HTML document for fancy indexing (this is CPU and disk intensive);
Icon height and Icon width - you can set their values in pixels
to allow browser to precalculate the page layout without without holding until all the images have been loaded; if you choose default settings for these options, then the standard width and height of the icons supplied with the Apache software will be set;
Include icon in link - if enabled, makes the icons part of the anchor for the filename, for fancy indexing;
Filename width allows you to specify the width of the filename column in bytes ("*" means, that the column enlarges to the necessary width);
Description width (Apache 2.0.23 and later) allows you to specify the width of the description column in characters ("*"grows the column to the width necessary to accommodate the longest description string);
Display directories first - if enabled, subdirectory listings will always appear first, followed by normal files in the directory; this option makes sense only if Display fancy directory indexes is enabled too;
Generate HTML table (Apache 2.0.23 and later) - if enabled, this option constructs a simple table for fancy directory listing;
Ignore client variables - if enabled, all query variables from the client, including sort order, will be ignored;
Include ETags in header (Apache 2.0.23 and later) - if enabled, this returned the Last-Modified and ETag values for the listed directory in the HTTP header; this option works properly only if the operating system and file system return appropriate stat() results; also you should consider that changes to the size or date stamp of an existing file will not update the Last-Modified header on all Unix platforms;
Sort by version strings (Apache 2.0a3 and later)- if enabled, all files containing version numbers are sorted in a natural way;
- Directory index file - here you can set the list of resources, which must be returned when the client requests an index of the directory using the "/" symbol at the end of the directory name;
- Files to ignore in directory index - here you can list files, which must be hidden when listing a directory, using a shell-style wildcard expression or full filename;
- Directory index default icon - this option allows you to set the icon to display for files, when no specific icon is known; you should specify the relative URL to the icon.
- Directory index header file - this option allows you to specify the name of file that will be inserted at the top of the index listing.
- Directory index footer file - this option allows you to specify the name of file that will be appended to the end of the index listing.
- Sort directory index by... - this option allows you to choose the order of displaying of the fancyindexed directories: they can be listed in ascending or descending order and sorted by Name, Date, Size, or Description.
- Directory index icons - this option allows you to set the icon, that will be displayed next to a file ending.
- Directory index ALT tags - this option allows you to specify the alternate text to display for a file, instead of an icon; it's useful in case if the client is image-incapable, has image loading disabled, or failed to retrieve the icon.
- Directory index descriptions - this option helps to add a description to a file.
Make sure to click Save for saving changes
Proxying
This section allows you to configure proxy server options for your server.
Click the Proxying icon and you will see the
following page:

- Act as proxy server? - you can allow or prevent Apache from functioning as a forward proxy server.
- Block requests to domains - here you can list words, hosts and/or domains and any request for HTTP, HTTPS, and FTP documents to sites whose names contain matched words, hosts or domains will be blocked by the proxy server.
- Requests to pass to another proxy - using this option you can define remote proxies to this proxy; under "Requests" section you can indicate, that all requests must be forwarded to remote server, otherwise you can specified the name of a URL-scheme that the remote server supports, or a partial URL for which the remote server should be used in the "Matching..." field and in the "Forward to..." field a partial URL for the remote server must be set.
- Don't pass requests to another proxy for - this option allows you to list of subnets, IP addresses, hosts and/or domains so that any request to a host which matches one or more of these listed is always served directly. (It's only useful within intranet).
- Domain for requests with no domain - this option allows you to define the default domain which the Apache proxy server will belong to and any request without a domain name will be redirected to the same host with specified default domain. (It's only useful within intranet).
- Ports to which CONNECT is allowed - here you can specify the list of port numbers to which the proxy CONNECT method may connect; by default, only the default https port (443) and the default snews port (563) are enabled.
- Maximum proxies in request chain - to prevent infinite proxy loops you can set the maximum number of proxies that a request may pass (10 by default).
- Preserve original Host: header - if this option is enabled, the Host: line (instead of the hostname) will pass from the incoming request to the proxied host; this option should normally be turned off.
- Proxy request timeout in seconds - use this setting in case, if you have a slow appserver which hangs, specify a timeout on proxy requests (300 sec. by default)
- Set Via: headers - this option helps to control the use of the Via: HTTP header by the proxy
if you choose "Yes", then each request and reply will get a Via: header line added for the current host if you choose "No", no special processing is performed
- Caching enabled? this option just enables/disables caching
- Cache default expiry time - you can specify a default time to cache a document without an expiry date or last-modified date (1 hour by default).
- Paths and URLs to cache - you can use this setting to specify the cache storage manager (memory based, disk based or file descriptor cache) and the location where URLs must be cached.
- Cached file expiry time factor - here you can set the expiry time factor to be used in the generation of an expiry date for a document, that provides a last-modified date only. (Default value is 0.1)
- Cached file maximum expiry time - you can specify the maximum time for which cacheable HTTP documents will be retained without checking the origin server. (1 day by default)
- Cache directory name length - allows to set the number of characters for each subdirectory name in the cache hierarchy (2 by default)
- Cache directory levels - allows to set the number of subdirectory levels in the cache (3 by default)
NOTE:The result of (Cache directory name length)*(Cache directory levels) must not be higher than 20.
- Cache garbage collection interval - allows to set the interval between attempts to free up disk space.
- Maximum file size to cache - you can set the maximum size (in bytes) for a document that is acceptable for storage in the cache.
- Minimum file size to cache - you can set the minimum size (in bytes) for a document that is acceptable for storage in the cache (1 by default).
- Cache directory - use this setting to define the name of the directory on the disk where cache files will be contained.
- Cache size - this setting allows you to define the disk space (in KBytes) you want to use for the cache (1000000 KB by default)
NOTE:You should always set a value that is lower than the available disk space
- Maximum objects to cache in memory - this option allows to set maximum number of object to be stored in cache; this value is used to generate the open hash table
- Maximum object size to cache in memory - here you can set the maximum allowable size (in bytes) of a document, that can be stored.
- Minimum object size to cache in memory - here you can set the minimum allowable size (in bytes) of a document, that can be stored
Make sure to click Save to preserve changes
SSL Options
This section allows you to configure SSL (Secure Sockets Layer) options of your web-server. Click the SSL Options icon.
If the 'mod_ssl' Apache module is used, you will see the following page:

Enable SSL? just turns on/off SSL on a server
SSL protocols you can use this option to control the SSL protocol flavors; clients then can only connect with one of the provided protocols:
SSLv2 - the Secure Sockets Layer (SSL) protocol, version 2.0
SSLv3 - the Secure Sockets Layer (SSL) protocol, version 3.0, the successor to SSLv2
TLSv1 - the Transport Layer Security (TLS) protocol, version 1.0, the successor to SSLv3
Certificate/private key file you can use this setting to point to the PEM-encoded Certificate file for the server and optionally also to the corresponding RSA or DSA Private Key file for it (contained in the same file)
Private key file you can use this setting to point to the PEM-encoded Private Key file for the server
Client SSL certificate - you can choose the certificate verification level for the Client Authentication from in the drop-down menu:
default - the default value of this parameter for current Apache version;
not required - no client certificate is required;
optional - a valid client's certificate may be presented;
required - a valid client's certificate must be presented;
optional no CA - a valid client's certificate may be presented, but it need not to be successfully verifiable;
Client certificate depth - here you can set the maximum number of CA certificates, which are allowed to be followed while verifying the client certificate (for example, '0' means that self-signed client certificates are accepted only, '1' means that the client certificate can be self-signed or has to be signed by a CA which is directly known to the server, etc.)
SSL log file - here you can specify the name of the SSL log file and the path to this file (if needed)
Click Save to preserve changes.
When 'mod_apachessl' Apache module is used, you will see the following page:

- Enable SSL? - just turns on/off SSL on the server
- Disable SSL version 2 allows to disable SSL v.2 for better security
- Force SSL/notSSL access? - you can choose Allow SSL access only option to protect against inadvertently disabling SSL
- Certificate/private key fileyou can use this setting to point to the PEM-encoded Certificate file for the server and optionally also to the corresponding RSA or DSA Private Key file for it (contained in the same file)
- Private key fileyou can use this setting to point to the PEM-encoded Private Key file for the server
- Disable presentation of Certification Authorities list - using this option you can disable presentation of CA list for client certificate authentication, it can be handy for testing purposes
- Path to directory with certificates of the Certification Authorities in here you can specify the path to the directory, that contains the Certificates of Certification Authorities, whose client you deal with.
- File with certificates of the Certification Authorities in you can use this option (alternatively or additionally to previous one) to set the file where the Certificates of Certification Authorities are assembled
- Client SSL certificate - you can choose the certificate verification level for the Client Authentication from in the drop-down menu
- Export client certificates and the certificate chain behind them to CGIs
- Time in seconds that the session key will be cached - you can set the timeout (in seconds) for the information stored in the SSL Session Cache and the OpenSSL internal memory cache; this value should be not less than 300.
- File against the client DN is checked - here you can enter the name of the file, against which the client DN is checked, and if it appears in the file, access is permitted, otherwise - denied
- Simulates user basic authentication logons, using the certificate name - if this option is enabled with the Client SSL certificate option, the name of an non-authorized user at attempt of connection will appear in the error log and access will be refused
- Check client certificates against an appropriate CRL (in SSLCACerificatePath)
- Check all certificates in the chain against their CRLs - if enabled, all certificates in the chain against their CRLs will be checked, rather than just the client certificate
- Possible Cipher suites to use by SSL negotiation - using this option you can choose several Cipher suites, used after the connection is established, to verify the cipher
Make sure to click Save to preserve changes
PHP

Automatic Virtual Server
This section allows you to configure automatic virtual hosts for server.
Click the Automatic Virtual Server icon and you see the following page:

- Automatic virtual host root - you can use this setting to indicate the location of your documents for Apache server, using the value of the server name
- Use IP address instead of hostname? - if this option is enabled, it allows you to use the IP address of the server end of the connection for directory interpolation instead of the server name
- Automatic virtual host cgi-bin - this option allows you to point the location of CGI scripts and programs similarly to the Automatic virtual host root option
Make sure to click Save to preserve changes
Filters
This section allows you to set input and output filters. Click the Filters icon and you see the following page:

- Apply input filters for all files - if enabled, this options sets the filters which will process client requests when they are received by the server
- Apply output filters for all files - if enabled, this options sets the filters which will process responses from the server before they are sent to the client
- Input filters - this setting allows you to specify the input filters and extensions of the files, which are to be processed with these filters
- Output filters - this setting allows you to specify the output filters and extensions of the files, which are to be processed with these filters
Languages
Set languages for the virtual server:

Set charsets for the virtual server:

Image Maps

Show Directives
All configurations mentioned above can be accessed through the Show Directives section.
It presents the part of the Apache configuration file associated with the virtual host.
Each link directs you to the appropriate CP+ section and you can view or configure it:
1. To view all directives, click the Show Directives icon.

2. You can edit directives by choosing the directive from the drop-down box and clicking the Edit Apache Directive button.
It will take you to the section in CP+ that deals with it.
|