Core functionsmod_core overviewmod_core module provides implementation of features that are used in Helicon Ape as a whole.
Core directivesAccessFileName
AccessFileName directive specifies a list of file names that Helicon Ape will consider the names of distributed configurations. Default file name is .htaccess. Helicon Ape will only load the first found file in this list. To protect configuration files starting from .ht the following piece of code will be written in your httpd.conf upon installation:
Note! If you are about to change default configuration file name using AccessFileName directive, you'll need to write rules to protect them manually. When any changes are applied to the configuration file it will be reloaded automatically upon the next request to the server.
AllowOverride
AllowOverride directive declares which directives in distributed .htaccess files can override parent level directives (httpd.conf). This directive also enables or disables .htaccess files for specific virtual host (web site) or directory. The following values are supported:
All value enables .htaccess file and all directives in it. None disables all .htaccess files and directives. This directive is inheritable. This means if you specify AllowOverride none for some directory, .htaccess files will also be disabled for all subdirectories. Note! AllowOverride function has the default value of All. AllowOverride None is usually necessary only on high-load servers, when you need to stop processing of .htaccess files inside specific locations:
AuthName
AuthName directive sets the name of the authorization realm for the directory. This realm is needed for the user to know which username and password to send. AuthName has a single argument - auth-domain. If the realm name contains spaces, it must be enclosed into quotation marks. It must be accompanied by AuthType and Require directives, and directives such as AuthUserFile and AuthGroupFile to work. Example:
The string set to AuthName will appear in the password dialog provided by most browsers.
AuthType
AuthType directive allows to choose between Basic and Digest authentication. To implement authentication you must also use the AuthName and Require directives. In addition, the server must have an authentication-provider module such as mod_authn_file and an authorization module such as mod_authz_user. ErrorLog
ErrorLog directive sets the name of the file to which the server will log errors it encounters. If the file-path is not absolute, it is assumed to be relative to the ServerRoot. Example:
Include
Include directive allows inclusion of other configuration files from within the server configuration files. The file-path specified may be an absolute path, or may be relative to the ServerRoot directory. Example:
LogLevel
LogLevel directive adjusts the verbosity of the messages recorded in the error logs. The following values are possible:
Example:
Require
Require directive selects which authenticated users can access
a resource. The restrictions are processed by authorization modules. Example:
Satisfy
Satisfy directive defines access policy if both Allow and Require directives are used (i.e. a particular area is restricted by both username/password and client host address). Values:
Example:
StopOnError
StopOnError directive regulates whether Helicon Ape should ignore unknown directives in its configs or give out the 500 error. Values:
<Directory>
<Directory> ... </Directory> tag is used to group directives that will be applied to the specific file system directory and sub-directories. Wildcard characters ? and * are allowed. Regular expressions can also be used with prepended ~ character. Be careful with directory-path arguments: They have to literally match the file system path which is used to access files. Directives applied to the particular <Directory> will not be applied to files accessed from that directory via a different path, i.e. via different symbolic links. Only fully qualified file paths are allowed. Example:
<DirectoryMatch>
<DirectoryMatch> ... </DirectoryMatch> is used to enclose a group of directives which will be applied only to the specified file system directory and its sub-directories. This directive works exactly as <Directory ~>. Example:
<Files>
<Files> directive limits the scope of enclosed directives by filename. The filename argument should include a filename, it supports ? and * wildcards and regular expressions with prepended ~ character. Example:
<FilesMatch>
<FilesMatch> directive does exactly the same as <Files ~>. Example:
<IfModule>
<IfModule> section is used to mark directives that are dependant on the presence of a specific module. The test in <IfModule> section may be performed in two ways:
In the first case the directives will only be processed if the module named module is included in Helicon Ape. The second case implies the reverse situation and processes the directives only if module is not included. <Limit>
<Limit> section allows to restrict the effect of the access controls to the nominated HTTP methods. Methods include: GET, POST, PUT, DELETE, CONNECT, OPTIONS, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK and more. Note! The method name is case-sensitive. Note! If GET is used, HEAD requests will also
be restricted. The TRACE method cannot be limited. Example:
<LimitExcept>
<LimitExcept> section is used to enclose a group of access control directives which will be applied to any HTTP access method not listed in the arguments. This directive has reverse effect to <Limit> directive. Example:
<Location>
<Location> ... </Location> tag is used to group directives that will apply to specific URL or virtual path. <Location> sections operate completely outside the file system thus these directives should not be used to control access to file system locations since several different URLs may map to the same file system location. The URL-path is a virtual path in the form /path/. Protocol, hostname, port and query string may be lacking. URL-path may include wildcards ? and * or regular expression starting with ~ character. Example:
<LocationMatch>
<LocationMatch> directive does exactly the same as <Location ~>. Example:
<Proxy>
<Proxy> section may include directives that will apply only to matching proxied content. Wildcards are possible. Note! mod_proxy is required to make <Proxy> directive working. Example: Below is an example to allow hosts only from somenet.example.com access content via your proxy server:
Example: Here's an example to process all files in foo directory of example.com through the INCLUDES filter when they are sent through proxy server:
<ProxyMatch>
<ProxyMatch> directive is identical to <Proxy> directive, except that it matches URLs using regular expressions. <VirtualHost>
<VirtualHost> ... </VirtualHost> tag is used to group directives that will be applied to the specific virtual host. Possible values for addr value are:
Example:
|