Pick a Free OS

User login

Navigation

Web server tutorial - Part 2

The following directives define some format nicknames for use with a CustomLog

directive (see below).

LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i"

"%{User-Agent}i"" combined

LogFormat "%h %l %u %t "%r" %>s %b" common

LogFormat "%{Referer}i -> %U" referer

LogFormat "%{User-agent}i" agent


The location and format of the access logfile (Common Logfile Format).

If you do not define any access logfiles within a container,

they will be logged here. Contrariwise, if you do define per-

access logfiles, transactions will be logged therein and not in this file.

CustomLog /var/log/httpd/access_log common

If you would like to have agent and referer logfiles, uncomment the following

directives.

CustomLog /var/log/httpd/referer_log referer

CustomLog /var/log/httpd/agent_log agent


If you prefer a single logfile with access, agent, and referrer information

(Combined Logfile Format) you can use the following directive.

CustomLog /var/log/httpd/access_log combined

Optionally add a line containing the server version and virtual host name to

server-generated pages (error documents, FTP directory listings, mod_status

and mod_info output etc., but not CGI generated documents).

Set to "EMail" to also include a mailto: link to the ServerAdmin.

Set to one of: On | Off | EMail

ServerSignature On

Aliases: Add here as many aliases as you need (with no limit). The format is


Alias fakename realname

Note: If you include a trailing / on fakename then the server will require

it to be present in the URL. So "/icons" isn't aliased in this example,

only "/icons/"..

Alias /icons/ "/home/httpd/icons/"


Options Indexes MultiViews

AllowOverride None

Order allow,deny

Allow from all

ScriptAlias: This controls which directories contain server scripts.

ScriptAliases are essentially the same as Aliases, except that documents in

the realname directory are treated as applications and run by the server when

requested rather than as documents sent to the client.