Have you sometime a question what is url, url-path, file-path, regex, mime-type and more? The answer is in this article. We describe a basic terms used to describe apache webserver directives. So what is Apache server – Terms Used to Describe Directives ?

Directives use a great number of different argument types. A few common ones are defined below.



A complete Uniform Resource Locator including a scheme, hostname, and optional pathname as in http://www.example.com/path/to/file.html/



The part of a url which follows the scheme and hostname as in /path/to/file.html. The url-path represents a web-view of a resource, as opposed to a file-system view.



The path to a file in the local file-system beginning with the root directory as in /usr/local/apache/htdocs/path/to/file.html. Unless otherwise specified, a file-path which does not begin with a slash will be treated as relative to the ServerRoot.


The path to a directory in the local file-system beginning with the root directory as in /usr/local/apache/htdocs/path/to/.



The name of a file with no accompanying path information as in file.html.



A Perl-compatible regular expressionpcre. The directive definition will specify what the regex is matching against



In general, this is the part of the filename which follows the last dot. However, Apache recognizes multiple filename extensions, so if a filename contains more than one dot, each dot-separated part of the filename following the first dot is an extension. For example, the filename file.html.en contains two extensions: .html and .en. For Apache directives, you may specify extensions with or without the leading dot. In addition, extensions are not case sensitive.



A method of describing the format of a file which consists of a major format type and a minor format type, separated by a slash as in text/html.



The name of an environment variable defined in the Apache configuration process. Note this is not necessarily the same as an operating system environment variable. See the environment variable documentation for more details.


Configuration changes in apache2 webserver

We can make individual configuration changes for (sub)domain in two ways:

Configuration File of (sub)domain

Changes in configuration file make directly administrator writing configuration to config file. Advatages is a better security and better performance. Disadvatage is less flexibile in configuration changes when you have a web site in hosting company.

.htaccess config file

configuration changes is writing to file with name .htaccess which is loaded on server in our appliacation directory or subdirectory. Working with .htaccess is primary for users, that have a access to filesystem. Using .htacces must be enabled in configuration file of (sub)domain.


Configuration changes can be writing to .htaccess file and to configuration file together. In this case configuration in .htaccess file has precedence over configurationn file with one important exeption – this is mod_rewrite.

Related Post

MySQL: Run Query from Bash Script or Linux Command... Sometimes it is needed to run some MySQL queries from the Linux command-line interface without accessing the interactive MySQL prompt. For example, wh...
Downloading an Entire Web Site with wget Sometimes you want to downloading an entire web site that you can take and view even without internet access. Using wget you can make such copy easily...
Rewrite uri to lowercase in nginx webserver Rewrite uri to lowercase in nginx webserver   We want make our uri case insensitive. What it is? When I call uri like https://manpages....
How Does Apache Decide Order to Execute Modules? I have a question for all. Modules such as mod_dir, mod_alias, mod_rewrite... how does Apache determine what order to process them?   Apache ...

Pin It on Pinterest