0% found this document useful (0 votes)
51 views81 pages

HTTPD Ref

This document provides information on configuring the NCSA HTTPd server, including: - There are three main configuration files that must be edited to configure the server. - If any configuration files are changed, the server must be restarted for the changes to take effect. - Instructions are provided on restarting and terminating the standalone server daemon.

Uploaded by

postscript
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PS, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views81 pages

HTTPD Ref

This document provides information on configuring the NCSA HTTPd server, including: - There are three main configuration files that must be edited to configure the server. - If any configuration files are changed, the server must be restarted for the changes to take effect. - Instructions are provided on restarting and terminating the standalone server daemon.

Uploaded by

postscript
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PS, PDF, TXT or read online on Scribd

Configuration of NCSA HTTPd Page 1

Configuration

These rules apply to all of HTTPd’s configuration files.


Case insensitive
Except where pathnames are involved, these files are not case sensitive.
Comment lines begin with #
Lines which should be ignored begin with #, the hash sign. This must be the
first character on the line. Comments must be on a line by themselves.
One directive per line
Each line of these files consists of:
Directive data [data2 ... datan]
Directive is a keyword HTTPd recognizes, followed by whitespace.
data is specific to the directive. Any additional data entries should be
separated by whitespace.
Extra whitespace is ignored
You can put extra spaces or tabs between Directive and data. To embed
a space in data without separating it from any subsequent arguments use a \
character before the space.

1
Back to Configuration Overview
2
NCSA HTTPd Development Team / httpd@[Link] / 9−11−95

1 [Link]
2 ../[Link]
[Link] Printed Tue Dec 5 [Link] 1995
Configuration of NCSA HTTPd Page 1

Configuration
Configuration means customizing HTTPd’s configuration files to reflect your system
and how HTTPd should act on your system.
1
Please read this general information which applies to all of HTTPd’s configuration
files.
2
Also, after changing the main configuration files of your server, you need to restart
the server for the changes to take effect.

There are three main configuration files you must edit.


3
Server Configuration
Technical aspects of server operation.
4
Resource Configuration
Document and script locations and aliases.
5
Access Control
Control which clients access certain directories, and which features are
available in different directories.

6
Back to Server Administration
7
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
8−29−95

1 ../[Link]
2 [Link]
3 ../httpd/[Link]
4 ../srm/[Link]
5 ../access/[Link]
6 [Link]
7 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd Standalone Management Page 1

Managing the Standalone Daemon


1
If you are using a ServerType of inetd, you do not need to read these instructions.

If you make any changes to HTTPd’s configuration files, you must restart the server.
To do so, you will need to know where the server has logged its process id, given by
2
the server configuration directive PidFile.
If pidfile is the setting of PidFile for your server, to restart the daemon execute
the following on the command line:
kill −1 ‘cat pidfile‘
or
kill −HUP ‘cat pidfile‘
This will restart the daemon.
You should now check to see if the daemon restarted successfully. Check the last line
3
of the server’s error log, given by the server configuration directive ErrorLogFile,
and make sure it says HTTPd: successful restart.
Alternatively, you may use the ps command to grep for the process id of the
daemon.

If you ever need to terminate the server, use the following command:
kill ‘cat pidfile‘
Node: Don’t use kill −9 ‘cat pidfile‘ to kill the server because kill
−9 will kill the parents but will not kill all the children on some systems.

4
Return to the Administration Overview
5
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
8−29−95

1 ../httpd/[Link]
2 ../httpd/[Link]
3 ../httpd/[Link]
4 [Link]
5 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd Server Configuration File Page 1 NCSA HTTPd Server Configuration File Page 2
29
AgentLog 30
RefererLog 31
Server Configuration File RefererIgnore32
PidFile 33
1 2 3 4 5
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials
6 7 8
LogDirGroupWriteOk 34
LogDirOtherWriteOk 35

When you unpacked HTTPd, there should have been a directory called conf. In LogOptions
there is a file called [Link]−dist. This is a template for your server KeepAlive 36

configuration file. We suggest you use this file only for reference, and edit the file KeepAlive 37

conf/[Link] as your server configuration file. KeepAliveTimeout 38


MaxKeepAliveRequests
Here is a list of the directives this file recognizes. Following the link will give you Security Related 39

usage information, default values, and examples. AssumeDigestSupport


9
ServerType
10
Port 11
User 12 Return to Configuration Instructions
40

Group 13
ServerAdmin 14 NCSA HTTPd Development Team / httpd@[Link] / 10−02−95
41

ServerRoot 15
ServerName 16
StartServers 17
MaxServers 18
TimeOut 19
AccessConfig 20
ResourceConfig 21
TypesConfig 22
IdentityCheck 23
BindAddress
24
Host 25
VirtualHost 26
SRMOptions
Logging 27
ErrorLog 28
TransferLog

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 [Link]
10 [Link]
11 [Link]
12 [Link]
13 [Link]
14 [Link]
15 [Link]
16 [Link] 29 [Link]
17 [Link] 30 [Link]
18 [Link] 31 [Link]
19 [Link] 32 [Link]
20 [Link] 33 [Link]
21 [Link] 34 [Link]
22 [Link] 35 [Link]
23 [Link] 36 [Link]
24 [Link] 37 [Link]
25 [Link] 38 [Link]
26 [Link] 39 [Link]
27 [Link] 40 ../[Link]
28 [Link] 41 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AccessConfig Directive Page 1 NCSA HTTPd AccessConfig Directive Page 2
HTTPd looks for access configuration in the file conf/access−global in the
12
ServerRoot directory.
AccessConfig Directive AccessConfig /httpd/admin/access
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials
HTTPd looks for access configuration in the file /httpd/admin/access.

Purpose
13
The AccessConfig directive gives HTTPd the location of the global access
9
Return to Server Configuration File Overview
configuration file. 14
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95
Syntax
AccessConfig file
file is the name of the global access configuration file. It is either a full pathname,
10
or a partial pathname relative to ServerRoot.
Only one AccessConfig directive is allowed in the configuration file.

Virtual Host
Access Information can be different across different hosts, but the configuration file
is the same. For non−overlapping directory trees, you can merely specify different
constraints for different directories. For overlapping trees, you must have different
11
AccessFileNames for each host and cannot use the global configuration.

Default
If you do not specify an AccessConfig, HTTPd assumes:
AccessConfig conf/[Link]
Compile Option: ACCESS_CONFIG_FILE

Examples
AccessConfig conf/access−global

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 ../access/[Link] 12 [Link]
10 [Link] 13 [Link]
11 ../srm/[Link] 14 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AgentLog Directive Page 1 NCSA HTTPd AgentLog Directive Page 2

Default
AgentLog Directive
If you do not specify an AgentLog, HTTPd assumes:
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials AgentLog logs/agent_log
Compile Option: DEFAULT_AGENTLOG
Purpose
The AgentLog directive tells HTTPd where to record client agent software. The
UserAgent header, if present, is recorded in the format sent by the client. If
9 Examples
LogOptions is set to Combined, this directive does nothing.
AgentLog logs/agents
This is for statistical purposes and the tracing of protocol violations. It should be
included by all clients. The first white space delimited word must be the software 11
This logs user agents to the file logs/agents in the ServerRoot directory.
product name, with an optional slash and version designator. Other products which
form part of the user agent may be put as separate words. AgentLog /tmp/httpd−agents
This logs user agents to the file /tmp/httpd−agents.
A User Agent Log Example AgentLog /dev/null
The timestamp is the same from the access_log. This effectively turns off agent logging.
[02/Oct/[Link] SPRY_Mosaic/v7.36 (Windows 16−bit) SPRY_package/v4.00
[02/Oct/[Link] Mozilla/1.1N (X11; I; SunOS 5.3 sun4c)
[02/Oct/[Link] Mozilla/1.0N (Windows) 12
[02/Oct/[Link] Mozilla/1.22 (Windows; I; 16bit) Return to Server Configuration File Overview
[02/Oct/[Link] NCSA Mosaic for the X Window System/2.4 libwww/2.12 modified
[02/Oct/[Link] Mozilla/1.0N (Windows) NCSA HTTPd Development Teamgateway
/ httpd@[Link]
13
/ 10−02−95 libwww/2.16pre
[02/Oct/[Link] IBM WebExplorer DLL /v1.02 via proxy gateway CERN−HTTPD/3.0pre5 libwww/2.16pre via proxy CERN−HTTPD/3.0pre5
[02/Oct/[Link] NCSA Mosaic for the X Window System/2.4 libwww/2.12 modified
[02/Oct/[Link] MacWeb/1.00ALPHA3 libwww/2.17

Syntax
AgentLog file
file is the name of the file to which user agents will be logged. It is either a full
10
pathname, or a partial pathname relative to ServerRoot.

Virtual Host
This directive is valid in the virtual host section.

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/ 11 [Link]
9 [Link] 12 [Link]
10 [Link] 13 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd Directive Page 1

Directive
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials

Purpose

Syntax

Virtual Host

Default
Compile Option:

Examples

9
Return to Configuration File Overview
10
NCSA HTTPd Development Team / httpd@[Link] / 10−02−95

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 [Link]
10 ../../[Link]

[Link] Printed Tue Dec 5 [Link] 1995


NCSA HTTPd BindAddress Directive Page 1 NCSA HTTPd BindAddress Directive Page 2

9
Return to Configuration File Overview
BindAddress Directive
10
1 2 3 4 5 6 7 8
NCSA HTTPd Development Team / httpd@[Link] / 10−02−95
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials

Purpose
This is the second method for providing virtual host support. This allows for greater
flexibility in configuration specific to each host, but is also more wasteful of
resources. This method works by telling the server to only listen to a single address.
This means that you need a separate copy of the server running for each virtual host
address.

Syntax
BindAddress servername
Where servername is a DNS name that maps to a single IP address, or an IP address.

Virtual Host
This directive is incompatible with VirtualHost configuration. You cannot run both a
BindAddress server and a VirtualHost server on the same machine.

Default
The Default is INADDR_ANY, which is listen to all addresses.

Examples
BindAddress [Link]
This would cause the server to only respond to connects to localhost.
BindAddress *
This would cause the server to respond to connects to any address. This is the default.

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link] 9 [Link]
8 ../../tutorials/ 10 ../../[Link]

[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd ErrorLog Directive Page 1 NCSA HTTPd ErrorLog Directive Page 2

Examples
ErrorLog Directive ErrorLog logs/errors
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials 12
This logs errors to the file logs/errors in the ServerRoot directory.
ErrorLog /tmp/httpd−errors
Purpose
This logs errors to the file /tmp/httpd−errors.
The ErrorLog directive sets the file to which HTTPd will log errors and status
messages it encounters. It currently logs the following: ErrorLog /dev/null
Startup Message, Restart Message, and Halt Message This effectively turns off error logging.
Debug Dumps (from USR1 signal)
Clients which time out and abort
Scripts which produce no output (malformed header from script)
9
.htaccess files which attempt to override things they do not have permission to 13

Server bugs which produce a segmentation violation or bus error Return to Server Configuration File Overview
10
User Authentication configuration problems 14

File doesn’t exist errors NCSA HTTPd Development Team / httpd@[Link] / 10−02−95
Resource Limit errors

Syntax
ErrorLog file
file is the name of the file to which errors will be logged. It is either a full
11
pathname, or a partial pathname relative to ServerRoot.

Virtual Host
This directive is valid in the virtual host section.

Default
If you do not specify an ErrorLog, HTTPd assumes:
ErrorLog logs/error_log
Compile Option: DEFAULT_ERRORLOG

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 ../access/[Link] 12 [Link]
10 ../access/[Link]#user_auth 13 [Link]
11 [Link] 14 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd Group Directive Page 1 NCSA HTTPd Group Directive Page 2
If you do not specify a Group, HTTPd assumes:

Group Directive Group #−1


1 2 3 4 5 6 7
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials
8 Compile Option: DEFAULT_GROUP

Purpose Examples
The Group directive sets which group id the server will answer requests as. Group nogroup
In order to use this directive, the standalone server must be initially run as root. This will cause the server to run as group nogroup.
This directive does not mean that the original daemon process will run as the given Group #65536
group, it means that the children which answer requests run as the given group.
9 This will cause the server to run as group number 65536.
This directive is only applicable if you are using a ServerType of standalone.

10

Syntax Return to Server Configuration File Overview


11
Group id NCSA HTTPd Development Team / httpd@[Link] / 10−02−95
id is one of:
A name
Refer to the given group by name.
# followed by a group number
Refer to a group by its number.
Some systems require that this id must be a valid group found in /etc/group, or
else a runtime server error will occur.
HPUX Systems cannot use nobody as a valid group.

Virtual Host
Because of security limitations of the Unix(TM) security model, this directive can only
be set once for the entire server.

Default
1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/ 10 [Link]
9 [Link] 11 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd IdentityCheck Directive Page 1 NCSA HTTPd IdentityCheck Directive Page 2

IdentityCheck Directive 10

1 2 3 4 5 6 7 8
Return to Server Configuration File Overview
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials
11
NCSA HTTPd Development Team / httpd@[Link] / 10−02−95
Purpose
This directive enables RFC931 compliant logging of the remote user name for sites 9
which run identd or something similar. This information is logged in the access_log.
It should not be trusted in any way except for rudimentary usage tracking.
If you do not plan to use this information, keep this directive set to off. Your
network administrator will thank you later.

Syntax
IdentityCheck setting
setting is either on or off.
Only one IdentityCheck directive should appear in the configuration file.

Virtual Host
This directive is not valid in the virtual host section because this information is
determined before the server knows which host is being accessed.

Default
If no IdentityCheck directive is present, httpd assumes:
IdentityCheck off
Compile Option: DEFAULT_RFC931

Example
IdentityCheck on
Causes the server to check the identity of each person accessing it.
1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/ 10 [Link]
9 [Link] 11 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd KeepAlive Directive Page 1 NCSA HTTPd KeepAlive Directive Page 2
10
NCSA HTTPd Development Team / httpd@[Link] / 10−02−95

KeepAlive Directive
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials

Purpose
In normal HTTP transactions, the browser opens up a separate connection to the
server for everything the browser wants. So, if you have a page with 5 inline images,
the browser will use separate connections to get the page and each inline image. With
a browser which supports KeepAlive, the browsers requests the documents one at a
time through the same connection. This eliminates the start up time and cost of each
connection.

Syntax
KeepAlive is either On or Off

Virtual Host
This directive is not valid in VirtualHost configuration.

Default
The default is Off.
Compile Option: DEFAULT_ALLOW_KEEPALIVE

Examples
KeepAlive On
Turns on KeepAlive support.

9
Return to Configuration File Overview

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 [Link] 10 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd KeepAliveTimeout Directive Page 1

KeepAliveTimeout Directive
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials

Purpose
This directive specifies the maximum amount of time the server will wait between
requests on an open KeepAlive connection.

Syntax
KeepAliveTimeout #num
Where #num is number of seconds before the server times out and closes the
connection.

Virtual Host
This directive is not valid in VirtualHost configuration.

Default
The default is 10 seconds.
Compile Option: DEFAULT_KEEPALIVE_TIMEOUT

Examples
KeepAliveTimeout 60
This will allow the server to keep the connection open for a minute between requests.

9
Return to Configuration File Overview
10
NCSA HTTPd Development Team / httpd@[Link] / 10−02−95
1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 [Link]
10 ../../[Link]

[Link] Printed Tue Dec 5 [Link] 1995


NCSA HTTPd Directive Page 1

Directive
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials

Purpose

Syntax

Virtual Host

Default
Compile Option:

Examples

9
Return to Configuration File Overview
10
NCSA HTTPd Development Team / httpd@[Link] / 10−02−95

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 [Link]
10 ../../[Link]

[Link] Printed Tue Dec 5 [Link] 1995


NCSA HTTPd Directive Page 1

Directive
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials

Purpose

Syntax

Virtual Host

Default
Compile Option:

Examples

9
Return to Configuration File Overview
10
NCSA HTTPd Development Team / httpd@[Link] / 10−02−95

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 [Link]
10 ../../[Link]

[Link] Printed Tue Dec 5 [Link] 1995


NCSA HTTPd LogOptions Directive Page 1 NCSA HTTPd LogOptions Directive Page 2
Separate

LogOptions Directive With this LogOption, the logging behavior is reminiscent of NCSA HTTPd
12 13
1.4 with separate log files for RefererLog and AgentLog.
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials Servername
With this LogOption, the name which the server used is logged in the
Purpose 14 15
TransferLog. If you are using VirtualHost support, this will be the name of
VirtualHost.
The LogOptions directive allows you to switch between the Common Log File (CLF)
format with extra information going to separate files, or a somewhat extended CLF Date
format in which the extra information is logged at the end of the normal CLF
information. It also allows you to change various other aspects of server logging. 16
With this LogOption, the Date code section of the TransferLog will be
17 18
prepended to each line of the RefererLog and AgentLog to help with
Some Log Analysers won’t accept the combined format, so you might want to check correlating the various files. This is only valid with Separate.
first.

Virtual Host
Example Combined Log Format
[Link] − − [19/Sep/[Link] −0500] "GET
This directive is valid in virtual host configuration, and suggested if you intend to
/ HTTP/1.0" 200 2 424 "" "NCSA_Mosaic/2.7b1 (X11;IRIX 5.3 IP22) libwww/2.12 modified"
[Link] − − [19/Sep/[Link] −0500] "GET /images/[Link] HTTP/1.0" have
200a 6872
lot of virtual hosts as a way of reducing
"" "NCSA_Mosaic/2.7b1 the number
(X11;IRIX 5.3of file
IP22)descriptors
libwww/2.12 modified"
[Link] − − [19/Sep/[Link] −0500] "GET required.
/images/mosaic−httpd3−[Link] HTTP/1.0" 200 1503 "" "NCSA_Mosaic/2.7b1 (X11;IRIX 5.3 IP22) libwww/2.12 modifi
[Link] − − [19/Sep/[Link] −0500] "GET /docs/[Link] HTTP/1.0" 200 1752 "" "NCSA_Mosaic/2.7b1 (X11;IRIX 5.3 IP22) libwww/2.12 modified"
[Link] − − [19/Sep/[Link] −0500] "GET /images/[Link] HTTP/1.0" 200 1656 "[Link] "NCSA_Mosaic/2.7b1 (X11;IRIX 5.3 IP22) libww
Note the extra Referer field and the User agent field on the end Default
Example of CLF with Servername The default is Separate.
[Link] − − [06/Oct/[Link] −0500] "GET /beta−1.5/howto/[Link]" 200 3296 [Link]
[Link] − − [06/Oct/[Link] −0500] "GET /beta−1.5/patches/ HTTP/1.0" 200 559 [Link]
[Link] − − [06/Oct/[Link] −0500] "GET /icons/[Link] TTP/1.0" 200 509 [Link]
[Link] − − [06/Oct/[Link] −0500] "GET Examples
/icons/[Link] HTTP/1.0" 200 115 [Link]
[Link] − − [06/Oct/[Link] −0500] "GET /icons/[Link] HTTP/1.0" 200 130 [Link]
LogOptions Separate
This will have separate log files.
Syntax LogOptions Combined ServerName
LogOptions opt1 opt2
This will make a single log file with as much information as possible.
Where optn is:
Combined Return to Configuration File Overview
19

9 10
With this LogOption, the server doesn’t open a RefererLog or AgentLog. The 11 NCSA HTTPd Development Team / httpd@[Link] / 10−02−95
20

information normally logged to those files is now logged in the TransferLog.


1 ../../../
2 ../../
3 ../[Link] 12 [Link]
4 ../httpd/[Link] 13 [Link]
5 ../srm/[Link] 14 [Link]
6 ../access/[Link] 15 [Link]
7 ../../[Link] 16 [Link]
8 ../../tutorials/ 17 [Link]
9 [Link] 18 [Link]
10 [Link] 19 [Link]
11 [Link] 20 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd MaxKeepAliveRequests Directive Page 1 NCSA HTTPd MaxKeepAliveRequests Directive Page 2

10
Return to Configuration File Overview
MaxKeepAliveRequests Directive
11
1 2 3 4 5 6 7 8
NCSA HTTPd Development Team / httpd@[Link] / 10−02−95
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials

Purpose
This directive specifies how many requests the client can make through the
connection before the server closes it.

Syntax
MaxKeepAliveRequests #num
Where #num is the number of requests the server will fulfill.
A #num of 0 implies no maximum, and the server will continue the KeepAlive
9
transaction until the KeepAliveTimeout or until the browser closes the connection.

Virtual Host
This directive is not valid in VirtualHost configuration.

Default
The default is 5.
Compile Option: DEFAULT_KEEPALIVE_MAXREQUESTS

Examples
MaxKeepAliveRequests 0
The server will only close the connection if the timeout value is reached, or a
non−KeepAlive capable request is fulfilled (any request for which the server cannot
determine before sending the size of the request, including most CGI scripts and
Server Side Includes).

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/ 10 [Link]
9 [Link] 11 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd MaxServers Directive Page 1

MaxServers Directive
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials

Purpose
The MaxServers directive sets the maximum number of children for the hunt group
that NCSA HTTPd will launch to handle increased load from the number made at
9
run time by StartServers.
10
For more information on the server hunt group, see the 1.4 Changes.

Syntax
MaxServers number

Default
If nothing is specified, the server will use 10.
Compile Option: DEFAULT_MAX_DAEMON

11
Return to Server Configuration File Overview
12
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 [Link]
10 ../../[Link]#1.4
11 [Link]
12 [Link]

[Link] Printed Tue Dec 5 [Link] 1995


NCSA HTTPd PidFile Directive Page 1 NCSA HTTPd PidFile Directive Page 2
PidFile /tmp/httpd−pid

PidFile Directive This logs the process id to the file /tmp/httpd−pid.


1 2 3 4 5 6 7 8 PidFile /dev/null
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials
The server does not log its process id.
Purpose
The PidFile directive sets the file to which HTTPd records the daemon process id. 12

9
Return to Server Configuration File Overview
This directive is used only if ServerType is standalone. 13
NCSA HTTPd Development Team / httpd@[Link] / 10−02−95

Syntax
PidFile file
file is the name of the file to which the process id is logged. It is either a full
10
pathname, or a partial pathname relative to ServerRoot.
Only one PidFile directive is allowed in the configuration file.

Virtual Host
This directive is not valid in virtual host configuration.

Default
If you do not specify a PidFile, HTTPd assumes:
PidFile logs/[Link]
Compile Option: DEFAULT_PIDLOG

Examples
PidFile logs/pid
11
This logs the process id to the file logs/pid in the ServerRoot directory.

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 [Link]
10 [Link] 12 [Link]
11 [Link] 13 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd Port Directive Page 1 NCSA HTTPd Port Directive Page 2

Port 84
Port Directive The server would try to listen to port 84.
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials

10

Purpose Return to Server Configuration File Overview


11
The Port directive sets what port HTTPd listens to for clients. NCSA HTTPd Development Team / httpd@[Link] / 10−02−95

Syntax
Port num
num is a number from 0 − 65536. Most ports below 1024, except port 80, are
reserved by the system.
If you want to use a port below 1024 (such as 80, the standard HTTP port), and your
9
ServerType is standalone, you will need to run HTTPd as root when starting it
up.
Only one Port directive is allowed in the configuration file.

Virtual Host
The server can only listen to one port, so the Port directive is invalid in virtual host
configuration.

Default
If you do not specify a Port, HTTPd assumes:
Port 80
Compile Option: DEFAULT_PORT

Examples
Port 8080
The server would listen to port 8080.
1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/ 10 [Link]
9 [Link] 11 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd RefererIgnore Directive Page 1 NCSA HTTPd RefererIgnore Directive Page 2
This avoids logging referers from either [Link] or [Link]

RefererIgnore Directive
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials Return to Server Configuration File Overview
11

12
NCSA HTTPd Development Team / httpd@[Link] / 10−02−95
Purpose
9
The RefererIgnore directive tells HTTPd to ignore certain RefererLog lines. If the
RefererIgnore string is contained in the Referer header, then the line is not logged.

Syntax
RefererIgnore string1 string2 ... stringn
stringn is the set of characters to look for in the Referer header. If this string is
found, then the Referer is not logged. If there is no RefererIgnore directive, then all
referer information is logged.

Virtual Host
This directive is valid in virtual host configuration.

Default
10
If you do not specify a RefererIgnore, HTTPd doesn’t ignore logging any RefererLog
lines.

Examples
RefererIgnore [Link]
This avoids logging referers from [Link]
RefererIgnore news
This avoids logging referers from news articles.
RefererIgnore [Link] [Link]

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 [Link] 11 [Link]
10 [Link] 12 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd RefererLog Directive Page 1 NCSA HTTPd RefererLog Directive Page 2
Default
RefererLog Directive If you do not specify a RefererLog, HTTPd assumes:
1 2 3 4 5 6
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials
7 8 RefererLog logs/referer_log
Compile Option: DEFAULT_REFERERLOG
Purpose
The RefererLog directive tells HTTPd where to record referers. The Referer header,
if present, is recorded in the following format: Examples
RefererLog logs/referers
[Time Stamp] URI −> Document
13

Where URI is the Universal Resource Identifier for the document that references the This logs referers to the file logs/referers in the ServerRoot directory.
server, and Document is the name of the file being refered to. This is a path relative
9 RefererLog /tmp/httpd−referers
to DocumentRoot. It is also possible to ignore logging certain referers by using the
10
RefererIgnore directive. This logs referers to the file /tmp/httpd−referers.
11
This directive is non−functional under the Combined LogOption. RefererLog /dev/null
This effectively turns off referer logging.
A Referer Example Log
[02/Oct/[Link] [Link] −> /images/[Link]
14
[02/Oct/[Link] [Link] −> /images/[Link] Return to Server Configuration File Overview
[02/Oct/[Link] [Link] −> /ftp/
[02/Oct/[Link] [Link] −> /docs/tutorials/ 15

[02/Oct/[Link] [Link] −> /[Link]/ NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

Syntax
RefererLog file
file is the name of the file to which referers will be logged. It is either a full
12
pathname, or a partial pathname relative to ServerRoot.

Virtual Host
This directive is valid in virtual host configuration.

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 ../srm/[Link]
10 [Link] 13 [Link]
11 [Link] 14 [Link]
12 [Link] 15 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd ResourceConfig Directive Page 1 NCSA HTTPd ResourceConfig Directive Page 2
HTTPd looks for resource configuration in the file /httpd/admin/resources.

ResourceConfig Directive
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials Return to Server Configuration File Overview
12

13
NCSA HTTPd Development Team / httpd@[Link] / 10−02−95
Purpose
The ResourceConfig directive gives HTTPd the location of the resource
9
configuration file.

Syntax
ResourceConfig file
file is the name of the resource configuration file. It is either a full pathname, or a
10
partial pathname relative to ServerRoot.

Virtual Host
This directive is valid in virtual host configuration.

Default
If you do not specify a ResourceConfig, HTTPd assumes:
ResourceConfig conf/[Link]
Compile Option: RESOURCE_CONFIG_FILE

Examples
ResourceConfig conf/resources
11
HTTPd looks for resource configuration in conf/resources in the ServerRoot
directory.
ResourceConfig /httpd/admin/resources

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 ../srm/[Link]
10 [Link] 12 [Link]
11 [Link] 13 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd SRMOptions Page 1 NCSA HTTPd SRMOptions Page 2
<SRMOptions>
DocumentRoot /www/local
Alias /icons/ /usr/local/etc/httpd/icons/
SRMOptions ScriptAlias /cgi−bin/ /usr/local/etc/httpd/cgi−local/
# Local can use internal imagemap
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials AddType text/x−imagemap .map
AddType application/x−httpd−cgi .cgi
</SRMOptions>
</VirtualHost>
Purpose
This command is mostly for VirtualHost configuration. It allows you to specify
Server Resource Management (SRM) configuration in the Server Configuration file. 10

It works by calling the SRM parser on the file after the SRMOption line. Return to Configuration File Overview
11
NCSA HTTPd Development Team / httpd@[Link] / 11−06−95

Syntax
<SRMOptions>
Directive1 Config1
...
</SRMOptions>
9
Where Directive1 is a SRM directive. Any number of directives can be used in a
SRMOptions section.

Virtual Host
This directive is valid in both the VirtualHost section and the rest of the server
configuration file. More than one section is also possible.

Default
It works by default. There is no way to disable it.
Compile Option: none

Examples
<SRMOptions>
DocumentRoot /www
Alias /icons/ /usr/local/etc/httpd/icons/
</SRMOptions>
<VirtualHost [Link] required>
ServerName localhost
ServerAdmin yow@[Link]
1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/ 10 [Link]
9 ../srm/[Link] 11 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd ServerAdmin Directive Page 1 NCSA HTTPd ServerAdmin Directive Page 2
7−12−95

ServerAdmin Directive
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials

Purpose
The ServerAdmin directive gives the server your e−mail address. This is so that the
server can give people your address to report error conditions.

Syntax
ServerAdmin address
Where address is an e−mail address.

Virtual Host
This directive is valid in virtual host configuration.

Default
If you do not specify a ServerAdmin, HTTPd assumes nothing and prints no address
for reporting errors.
Compile Option: DEFAULT_ADMIN

Examples
ServerAdmin www@[Link]
Errors will have the address www@[Link] as the person to blame.

9
Return to Server Configuration File Overview
10
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 [Link]
10 [Link]

[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd ServerName Directive Page 1 NCSA HTTPd ServerName Directive Page 2

10
Return to Server Configuration File Overview
ServerName Directive
11
1 2 3 4 5 6 7 8
NCSA HTTPd Development Team / httpd@[Link] / 10−02−95
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials

Purpose
9
The ServerName directive sets the hostname HTTPd should return when creating
redirection URLs.
This directive should be used on systems where gethostbyname may not work on
the local host, or where the hostname returned should be a DNS alias such as
[Link].

Syntax
ServerName FQDN
Where FQDN is the full hostname (including domain name) to be returned as the
server address.

Virtual Host
This directive is valid in virtual host configuration.

Default
If you do not specify a ServerName, HTTPd attempts to retrieve it through system
calls.

Example
ServerName [Link]
This would set the server’s hostname as [Link], as opposed to
[Link] as would be returned from the gethostname system call.

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/ 10 [Link]
9 ../[Link]#Directive 11 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd ServerRoot Directive Page 1 NCSA HTTPd ServerRoot Directive Page 2

ServerRoot /web1/http
ServerRoot Directive This would set ServerRoot to /web1/http.
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials

Purpose Return to Server Configuration File Overview


10
The ServerRoot directive sets the directory in which HTTPd lives. NCSA HTTPd Development Team / httpd@[Link] / 10−02−95
Upon startup, HTTPd expects to find the Server Configuration File as
conf/[Link] in the ServerRoot directory.
Other Server Configuration directives may use this directory to give relative paths
for locations of files.

Syntax
ServerRoot dir
Where dir is an absolute path of a directory on your server machine.
Only one ServerRoot directive is allowed in the server configuration file.

Virtual Host
This directive is not available for virtual host configuration.

Default
If you do not specify a ServerRoot, HTTPd assumes:
ServerRoot /usr/local/etc/httpd
Compile Option: HTTPD_ROOT

Examples
ServerRoot /usr/local/httpd
This would set ServerRoot to the directory /usr/local/httpd.
1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link] 9 [Link]
8 ../../tutorials/ 10 ../../[Link]

[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd ServerType Directive Page 1 NCSA HTTPd ServerType Directive Page 2
Examples
ServerType Directive ServerType standalone
1 2 3 4 5 6
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials
7 8 ServerType inetd

Purpose 10
Return to Server Configuration File Overview
The ServerType directive sets how the server is executed by the system. 11
NCSA HTTPd Development Team / httpd@[Link] / 10−02−95

Syntax
ServerType type
type is one of:
inetd
To run the server from the system process inetd. The system then does all
socket and child management.
standalone
To run the server as a daemon process. The server then does all socket and
child management.
Only one ServerType directive is allowed in the configuration file.

Virtual Host
This directive is set for the entire server and cannot be used in the VirtualHost
section.

Default
If you do not specify a ServerType, HTTPd assumes:
ServerType standalone
9
We recommend against running the server from inetd. Here’s why.

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/ 10 [Link]
9 [Link] 11 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd StartServers Directive Page 1

StartServers Directive
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials

Purpose
The StartServers directive sets how many children NCSA HTTPd will launch at run 9
time. NCSA HTTPd will continue launching children up to MaxServers. For more
10
information on the server hunt group, see the 1.4 Changes.

Syntax
StartServers number

Virtual Host
This directive is not used by virtual host configuration.

Default
If no number is give, HTTPd will start 5 children.
Compile Option: DEFAULT_START_DAEMON

11
Return to Server Configuration File Overview
12
NCSA HTTPd Development Team / httpd@[Link] / 10−02−95

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 [Link]
10 ../../[Link]#1.4
11 [Link]
12 ../../[Link]

[Link] Printed Tue Dec 5 [Link] 1995


NCSA HTTPd TimeOut Directive Page 1 NCSA HTTPd TimeOut Directive Page 2
10
NCSA HTTPd Development Team / httpd@[Link] / 10−02−95

TimeOut Directive
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials

Purpose
The TimeOut directive sets the amount of time the server will wait for a client to
send its query once connected, or the maximum amount of time the server will spend
waiting for a client to accept information.

Syntax
TimeOut time
Where time is the amount of time in seconds the server should wait.
Only one TimeOut directive is allowed in the configuration file.

Default
If you do not specify a TimeOut, HTTPd assumes:
TimeOut 1200
This is a timeout of twenty minutes.
Compile Option: DEFAULT_TIMEOUT

Example
TimeOut 600
This sets the timeout to ten minutes. For large files served to slow network clients,
you may need every second of it.

9
Return to Server Configuration File Overview

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 [Link] 10 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd TransferLog Directive Page 1 NCSA HTTPd TransferLog Directive Page 2

TransferLog Directive
Default
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials
If you do not specify a TransferLog, HTTPd assumes:
TransferLog logs/access_log
Purpose
9 Compile Option: DEFAULT_XFERLOG
The TransferLog directive tells HTTPd where to record client accesses.
The logfile format is as follows. Each line consists of:
host rfc931 authuser [DD/Mon/YYYY:hh:mm:ss] "request" ddd bbbb "opt_referer" "opt_agent" Examples
TransferLog logs/downloads
host: Either the DNS name or the IP number of the remote client
rfc931: Any information returned by identd for this person, − otherwise. 13
This logs transfers to the file logs/downloads in the ServerRoot directory.
authuser: If user sent a userid for authentication, the user name, − otherwise.
DD: Day TransferLog /tmp/httpd−accesses
Mon: Month (calendar name)
YYYY: Year This logs transfers to the file /tmp/httpd−accesses.
hh: hour (24−hour format, the machine’s timezone)
mm: minutes TransferLog /dev/null
ss: seconds
request: The first line of the HTTP request as sent by the client. This effectively turns off transfer logging.
ddd: the status code returned by the server, − if not available.
bbbb: the total number of bytes sent, *not including the HTTP/1.0 header*, −
if not available 10
opt_referer: the referer field if given and if LogOptions is Combined
11 Return to Server Configuration File Overview
14

opt_agent: the user agent field if given and if LogOptions is Combined


15

You can determine the name of the file accessed through request. NCSA HTTPd Development Team / httpd@[Link] / 10−02−95

Syntax
TransferLog file
file is the name of the file to which transfers will be logged. It is either a full
12
pathname, or a partial pathname relative to ServerRoot.

Virtual Host
This directive is valid in virtual host configuration.
1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 ../[Link]#Directive
10 [Link] 13 [Link]
11 [Link] 14 [Link]
12 [Link] 15 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd TypesConfig Directive Page 1 NCSA HTTPd TypesConfig Directive Page 2
11
HTTPd looks for types configuration in the file conf/mime−types in the ServerRoot
directory.
TypesConfig Directive TypesConfig /httpd/admin/types−local
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials
HTTPd looks for types configuration in the file /httpd/admin/types−local.

Purpose
12
The TypesConfig directive gives HTTPd the location of the typing configuration file. Return to Server Configuration File Overview
13
This file is how HTTPd maps filename extensions to MIME types to return to NCSA HTTPd Development Team / httpd@[Link] / 10−02−95
HTTP/1.0 clients. You should not need to edit it. If you really want to, look at the
9
file format.

Syntax
TypesConfig file
file is the name of the types file. It is either a full pathname, or a partial pathname
10
relative to ServerRoot.
Only one TypesConfig directive is allowed in the configuration file.

Virtual Host
This directive is not valid for virtual host configuration.

Default
If you do not specify an TypesConfig, HTTPd assumes:
TypesConfig conf/[Link]
Compile Option: TYPES_CONFIG_FILE

Examples
TypesConfig conf/mime−types

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/ 11 [Link]
9 ../[Link] 12 [Link]
10 [Link] 13 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd User Directive Page 1 NCSA HTTPd User Directive Page 2

User #−1
User Directive Compile Option: DEFAULT_USER
1 2 3 4 5 6 7 8
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials

Examples
Purpose
User nobody
The User directive sets which user id the server will answer requests as.
9 This will cause the server to run as user nobody.
This directive is only applicable if you are using a ServerType of standalone.
User #−2
In order to use this directive, the standalone server process must be initially started as
root. This will cause the server to run as user number −2.
This directive does not mean that the original daemon process will run as the given
user, it means that the children which answer requests run as the given user.
10
Return to Server Configuration File Overview
11

Syntax NCSA HTTPd Development Team / httpd@[Link] / 10−02−95


User id
id is one of:
A name
Refer to the given user by name.
# followed by a user number
Refer to a user by their number.
Only one User directive is allowed in the configuration file.

Virtual Host
Due to the limits of the Unix(TM) security architecture, the server cannot run as more
than one user with the current server model while maintaining sufficient security on
other fronts.

Default
If you do not specify a User, HTTPd assumes:
1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/ 10 [Link]
9 [Link] 11 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd VirtualHost Directive Page 1 NCSA HTTPd VirtualHost Directive Page 2

VirtualHost Directive Examples


1 2 3 4 5 6 7 8 <VirtualHost [Link]>
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials ServerName [Link]
ServerAdmin blong@[Link]
DocumentRoot /www
Purpose </VirtualHost>

This directive allows you to customize the server to respond to different IP addresses <VirtualHost [Link] Required>
9 ServerName localhost
in different ways. See the tutorial for more information. ServerAdmin yow@[Link]
<SRMOptions>
DocumentRoot /www/local
Alias /icons/ /usr/local/etc/httpd/icons/
Syntax ScriptAlias /cgi−bin/ /usr/local/etc/httpd/cgi−local/
# Local can use internal imagemap
<VirtualHost servername errorlevel> AddType text/x−imagemap .map
... AddType application/x−httpd−cgi .cgi
</VirtualHost> </SRMOptions>
</VirtualHost>
Where :
servername
13
Return to Configuration File Overview
This is the DNS name or IP address of this virtual host. The DNS name
14
should map to a single IP address. NCSA HTTPd Development Team / httpd@[Link] / 10−02−95
errorlevel
This can be either Required or Optional. If set to Required, any
misconfiguration or problem will cause the server start to fail. If this is set to
Optional, the server will attempt to continue even if the configuration is
invalid. This is an optional parameter, and if left off, the server will default to
Required.
...
10 11
This can be any number of Server directives, including the SRMOptions
12
directive which allows Resource directives in the server configuration file.

Virtual Host
You cannot use VirtualHost directives within VirtualHost directives. You can use as
many VirtualHost directives as you like, up to the limits of your servers memory and
operating system.

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 ../../tutorials/[Link]
10 [Link]
11 [Link] 13 [Link]
12 ../srm/[Link] 14 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
Why Not inetd? Page 1

Why Not inetd?


Why should you run the server standalone as opposed to running it from inetd? If
your server has a lot of CPU cycles to burn, then there is nothing wrong with running
HTTPd from inetd. Most servers don’t.
If you run the server from inetd, that means that whenever a request comes in, inetd
must first fork a new process, then load the HTTPd binary. Once the HTTPd binary
is loaded, HTTPd must then load and parse all of its configuration files (including
[Link], [Link], and [Link]), which is quite a task to be done for each and
every request that comes in.
Now, contrast this with running standalone. When HTTPd gets a request, it makes a
copy of itself (which requires no loading of a binary since shared text pages are used),
and the copy handles the request. The configuration files have already been loaded on
startup, and so we don’t reload them every time.
In fact, with NCSA HTTPd 1.4 and 1.5, it doesn’t even have to make another copy of
itself if there is an extra server already running. The parent will just pass off the
request to the free child.

1
Return to ServerType instructions
2
NCSA HTTPd Development Team / httpd@[Link] / 10−02−95

1 [Link]
2 ../../[Link]
[Link] Printed Tue Dec 5 [Link] 1995
Setting up the Server Resource Map Page 1 Setting up the Server Resource Map Page 2

23
Return to Configuration Instructions
Setting up the Server Resource Map
24
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
When you unpacked HTTPd, there should have been a directory called conf. In 7−12−95
there is a file called [Link]−dist. This is a template for your resource
configuration file. We suggest you use this file only for reference, and edit the file
conf/[Link] as your resource configuration file.

1
Here is a list of the directives this file recognizes. Following the link will give you
usage information, default values, and examples.
2
DocumentRoot 3
UserDir 4
AccessFileName
Virtual URLs 5
Redirect 6
Alias 7
ScriptAlias8
AddType 9
AddEncoding 10
DefaultType
Indexing Options 11
DirectoryIndex 12
FancyIndexing 13
DefaultIcon 14
ReadmeName 15
HeaderName 16
AddDescription 17
AddIcon 18
AddIconByType 19
AddIconByEncoding 20
IndexIgnore 21
IndexOptions 22
ErrorDocument

1 ../[Link]#Directive
2 [Link]
3 [Link]
4 [Link]
5 [Link]
6 [Link]
7 [Link]
8 [Link]
9 [Link]
10 [Link]
11 [Link]
12 [Link]
13 [Link]
14 [Link]
15 [Link]
16 [Link]
17 [Link]
18 [Link]
19 [Link]
20 [Link]
21 [Link] 23 ../[Link]
22 [Link] 24 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AccessFileName Page 1

AccessFileName directive

Purpose
1
When returning a document to a client, the server looks for access control files in the
2
document’s directory as well as its parent directories. This directive sets the name of
the file HTTPd should look for to find access control files.

Syntax
AccessFileName file
Where file is a file name.
Only one AccessFileName directive is allowed in the server configuration file.

File
[Link]

Default
If you do not specify an AccessFileName, HTTPd assumes:
AccessFileName .htaccess

Example
AccessFileName .ncsa−acl
This would set AccessFileName to .ncsa−acl.

3
Return to Resource Configuration File Overview
4
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

1 ../access/[Link]
2 ../[Link]#Directive
3 [Link]
4 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AddDescription Page 1 NCSA HTTPd AddDescription Page 2
7−12−95

AddDescription directive

Purpose
Tells HTTPd how to describe a file or a file type while generating a directory index.

Syntax
AddDescription "blah blah blah" fileid
fileid is either a filename extension (like .html), a filename, a full real pathname
1
to a file on your system, or a wildcard pattern to match to filenames.
blah blah blah must be surrounded by quotes and is a short (preferably < 1
line) description of the file.
You may use as many AddDescription directives as you wish.

File
[Link]

Default
There are no default descriptions.

Example
AddDescription "a great batch of nonsense" [Link]
A portion of HTTPd’s index for [Link]’s directory would look something like
this:

[Link] (8000 bytes)


[Link] : a great batch of nonsense(10000 bytes)

2
Return to Resource Configuration File Overview
3
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
1 ../[Link]
2 [Link]
3 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AddEncoding Page 1 NCSA HTTPd AddEncoding Page 2

2
Return to Resource Configuration File Overview
AddEncoding directive
3
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95
Purpose
Allows you to specify an encoding type for a document with a given filename
extension.
In order to serve encoded documents to clients, the client must support the given
encoding method, as well as the HTTP encoding extension.

Syntax
AddEncoding type extension
type is the encoding type for the document.
extension is the filename extension to map to this encoding.
You may use as many AddEncoding directives as you wish.

File
[Link]

Default
There are no default encodings.

Example
AddEncoding x−gzip gz
This would cause any file ending in .gz to be marked as encoded using the x−gzip
encoding method.

Reference
1
See HTTP/1.0 Section 3.5 Content Codings

2 [Link]
1 [Link] 3 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AddIcon Page 1 NCSA HTTPd AddIcon Page 2

AddIcon (SND,/icons/[Link]) *.au


AddIcon directive This would reference /icons/[Link] as the image to show next to any
sound file, with the textual ALT tag of SND for non−image clients.

Purpose
4
Tells HTTPd what kind of an icon to show for a given filetype in a directory index. Return to Resource Configuration File Overview
1 5
You may wish to read the indexing tutorial for more information. NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

Syntax
AddIcon icon name1 name2...
2
icon is a virtual path to an image file which should be shown for files which match
the pattern of names. Alternatively, this can be a group of the format (alt,icon)
where alt is the text tag given for an icon for non−graphical browsers, and icon is a
virtual path.
name is either ^^DIRECTORY^^ for directories (or **DIRECTORY** for
backward compatibility), ^^BLANKICON^^, specifying the blank icon used to
format the list properly, a file extension (like .html), a partial filename, a wildcard
3
expression, or a complete physical pathname.
You may use as many AddIcon directives as you wish.

File
[Link]

Default
There are no default icons.

Example
AddIcon /icons/[Link] .gif .jpg .xbm
When HTTPd is indexing and finds a file with the extension .gif, .jpg, or .xbm, it
will reference /icons/[Link] as an image to show next to the filename.
AddIcon /icons/[Link] ^^DIRECTORY^^
If a given directory entry is in fact a subdirectory, /icons/[Link] will be
referenced as an image for that index entry.
1 ../../tutorials/index−[Link]
2 ../admin/[Link]#path 4 [Link]
3 ../[Link] 5 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AddIconByEncoding Page 1 NCSA HTTPd AddIconByEncoding Page 2

4
Return to Resource Configuration File Overview
AddIconByEncoding directive
5
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95
Purpose
Tells HTTPd what kind of an icon to show for a given filetype in a directory index.
1
You may wish to read the indexing tutorial for more information.

Syntax
AddIconByEncoding icon name1 name2...
2
icon is a virtual path to an image file which should be shown for files which match
the pattern of names. Alternatively, this can be a group of the format (alt,icon)
where alt is the text tag given for an icon for non−graphical browsers, and icon is a
virtual path.
3
name is a wildcard expression specifying the content−encoding for which to display
this icon.
You may use as many AddIconByEncoding directives as you wish.

File
[Link]

Default
There are no default icons.

Example
AddIconByEncoding /icons/[Link] x−compress
When HTTPd is indexing, if it finds a file compressed with the UNIX compress
command, it will display /icons/[Link].
AddIconByEncoding (CMP,/icons/[Link]) x−compress
Same as above, but the ALT tag would be CMP for these items.

1 ../../tutorials/index−[Link]
2 ../admin/[Link]#path 4 [Link]
3 ../[Link] 5 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AddIconByType Page 1 NCSA HTTPd AddIconByType Page 2

4
Return to Resource Configuration File Overview
AddIconByType directive
5
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95
Purpose
Tells HTTPd what kind of an icon to show for a given filetype in a directory index.
1
You may wish to read the indexing tutorial for more information.

Syntax
AddIconByType icon type1 type2...
2
icon is a virtual path to an image file which should be shown for files which match
the pattern of types. Alternatively, this can be a group of the format (alt,icon)
where alt is a 3−letter text tag given for an icon for non−graphical browsers, and icon
is a virtual path.
3
name is a wildcard expression of the MIME types for which to add this icon.
You may use as many AddIconByType directives as you wish.

File
[Link]

Default
There are no default icons.

Example
AddIconByType /icons/[Link] image/*
When HTTPd is indexing and finds a file which is an image, it will reference
/icons/[Link] as an image to show next to the filename.
AddIconByType (SND,/icons/[Link]) audio/*
This would reference /icons/[Link] as the image to show next to any
sound file, with the textual ALT tag of SND for non−image clients.

1 ../../tutorials/index−[Link]
2 ../admin/[Link]#path 4 [Link]
3 ../[Link] 5 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AddType Page 1

AddType directive

Purpose
Allows you to add entries to the server’s default typing information and cause an
extension to be a certain type. These directives override any conflicting entries in the
1
TypesConfig file.

Syntax
AddType type/subtype extension
type/subtype is the MIME−like type for the document.
extension is the filename extension to map to this type. This can either be a
filename extension, a full pathname, or a file name.
You may use as many AddType directives as you wish.

File
[Link]

Default
The default types are in the types configuration file.

Example
AddType text/plain doc
This would cause any file ending in .doc to be served as type text/plain.

2
Return to Resource Configuration File Overview
3
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

1 ../httpd/[Link]
2 [Link]
3 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd Alias Page 1

Alias directive

Purpose
1
The Alias directive creates a virtual document (or directory) on your server. Any
accesses to it will be satisfied by a different file or directory.

Syntax
Alias virtual path
2
virtual is the translated location of the file/directory.
path is the full pathname of the file or directory which should be used to fulfill the
request.
Several Alias directives may appear in the configuration file.

File
[Link]

Example
Alias /images /ftp/pub/images
This would cause requests for /images to be satisfied from the directory
/ftp/pub/images.
Thus, if someone requested /images/[Link], the server would return
/ftp/pub/images/[Link].

3
Return to Resource Configuration File Overview
4
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

1 ../[Link]#Directive
2 ../admin/[Link]
3 [Link]
4 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd DefaultIcon Page 1

DefaultIcon directive

Purpose
This directive specifies what icon should be shown in an automatically generated
directory listing for a file which has no icon information.

Syntax
DefaultIcon location
1
location is the virtual path to the icon on your server.
Only one DefaultIcon directive should appear in the configuration file.

File
[Link]

Default
If no DefaultIcon is present, HTTPd assumes nothing.

Example
DefaultIcon /icons/[Link]
This would cause a file with no icon to be given the icon /icons/[Link].

2
Return to Resource Configuration File Overview
3
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

1 ../admin/[Link]#path
2 [Link]
3 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd DefaultType Page 1

DefaultType directive

Purpose
If HTTPd can’t type a file through normal means, it will type it as DefaultType.

Syntax
DefaultType type/subtype
type/subtype is the MIME−like type.
Only one DefaultType directive should appear in the configuration file.

File
[Link]

Default
If no DefaultType is present, HTTPd assumes:
DefaultType text/html

Example
DefaultType application/octet−stream
This would cause a file with an unknown extension to be returned as type
application/octet−stream.

1
Return to Resource Configuration File Overview
2
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

1 [Link]
2 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd DirectoryIndex Page 1 NCSA HTTPd DirectoryIndex Page 2

11
Return to Resource Configuration File Overview
DirectoryIndex directive
12
1 2 3 4 5 6 7 8
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
Top − Docs − General − Server − Resource − Access − FAQ − Tutorials 7−12−95

Purpose
When a client requests a directory, HTTPd can return a pre−written index, or
9
generate one from the filesystem. The DirectoryIndex directive sets the file HTTPd
should look for as a prewritten index to a given directory.

Syntax
DirectoryIndex file
Where file is a file name.
Only one DirectoryIndex directive is allowed in the server configuration file.

File
[Link]

Default
If you do not specify a DirectoryIndex, HTTPd assumes:
DirectoryIndex [Link]

Example
DirectoryIndex .[Link]
This would set DirectoryIndex to .[Link]. A request for /dir would cause the
10
server to look for the file DocumentRoot/dir/.[Link]. If found, the
server would send it back to the client. Otherwise, it would create and return an index
from the filesystem.

1 ../../../
2 ../../
3 ../[Link]
4 ../httpd/[Link]
5 ../srm/[Link]
6 ../access/[Link]
7 ../../[Link]
8 ../../tutorials/
9 ../[Link]#Directive 11 [Link]
10 [Link] 12 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd ServerRoot Page 1 NCSA HTTPd ServerRoot Page 2
7−12−95

DocumentRoot directive

Purpose
1
The DocumentRoot directive sets the directory from which HTTPd will serve files.
2
If you need to serve files outside this directory, you can use the Alias directive, or
create symbolic links.
3
This directive affects how you access files on your server.

Syntax
DocumentRoot dir
Where dir is an absolute path of the directory you want documents to be served
from.
Only one DocumentRoot directive is allowed in the server configuration file.

File
[Link]

Default
If you do not specify a DocumentRoot, HTTPd assumes:
DocumentRoot /usr/local/etc/httpd/htdocs

Example
DocumentRoot /home/web
This would set DocumentRoot to the directory /home/web.

4
Return to Resource Configuration File Overview
5
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
1 ../[Link]#Directive
2 [Link]
3 ../admin/[Link]
4 [Link]
5 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd ErrorDocument Page 1 NCSA HTTPd ErrorDocument Page 2

ErrorDocument directive 6
Return to Resource Configuration File Overview
Purpose 7

1
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
The ErrorDocument directive points the server to a file to send in place of the 7−12−95
builtin error message.

Syntax
ErrorDocument type filename
Where type is one of:
302 − REDIRECT
400 − BAD_REQUEST
401 − AUTH_REQUIRED
403 − FORBIDDEN
404 − NOT_FOUND
500 − SERVER_ERROR
501 − NOT_IMPLEMENTED
2
And filename is a CGI script or text/html file with full path from
document root. CGI scripts launched via these errors have 3 new environment
variables, REDIRECT_REQUEST, REDIRECT_URL and
REDIRECT_STATUS. They also take as input the error reason of the form 3
err_string=error_reason. For an example script, see an example.

File
[Link]

Default
If this directive is left out, the compiled error messages will be used.

Examples
ErrorDocument 403 /cgi−bin/[Link] 4
ErrorDocument 404 /cgi−bin/nph−[Link]
ErrorDocument 500 /[Link]
ErrorDocument 501 /error/[Link]
5
For more information on Error scripts
1 [Link]
2 [Link]
3 /cgi/[Link]
4 /cgi/nph−[Link] 6 [Link]
5 /cgi/[Link] 7 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd FancyIndexing Page 1

FancyIndexing directive

Purpose
This directive specifies whether you want fancy directory indexing (with icons and
file sizes) or standard directory indexing.
If your documents are being served from an AFS drive, you will want to seriously
consider turning fancy indexing off.

Syntax
FancyIndexing setting
setting is either on or off.
Only one FancyIndexing directive should appear in the configuration file.

File
[Link]

Default
If no FancyIndexing directive is present, HTTPd assumes:
FancyIndexing off

Example
FancyIndexing on
Turns fancy indexing on.

1
Return to Resource Configuration File Overview
2
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

1 [Link]
2 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd HeaderName Page 1

HeaderName directive

Purpose
This directive specifies what filename HTTPd should look for when indexing a
directory, in order to add a custom header. This can describe the contents of the
directory.

Syntax
HeaderName name
name is the name of the file HTTPd should look for when trying to find a
description file. HTTPd will first look for [Link], and if found, will display
the HTML inlined with its own index. If it finds name, it will include the file as
plaintext.
Only one HeaderName directive should appear in the configuration file.

File
[Link]

Default
If no HeaderName is present, HTTPd assumes nothing.

Example
HeaderName HEADER
When generating an index for the directory /foo, HTTPd will look for
/foo/[Link], and will insert it at the top of the index if found. If not, it
will then look for /foo/HEADER and insert it if found. If it finds nothing, it will
include nothing.

1
Return to Resource Configuration File Overview
2
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

1 [Link]
2 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd IndexIgnore Page 1

IndexIgnore directive

Purpose
Tells HTTPd which files to ignore when generating an index of a directory.

Syntax
IndexIgnore pat1 pat2...
pat is a file extension or file name which should be ignored. When HTTPd is
looking in a directory, it will try to match each of these strings to the right hand side
of the entry’s string, and if it matches it will ignore that entry in its directory index.
1
If pat is a wildcard expression, HTTPd will match the filename against the given
match expression.

File
[Link]

Default
The only entry ignored by default is ’.’.

Example
IndexIgnore README [Link] .htaccess # ~
HTTPd will ignore files named README, [Link], and .htaccess when
indexing a directory. It will also ignore emacs autosave files and emacs backup files.

2
Return to Resource Configuration File Overview
3
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

1 ../[Link]
2 [Link]
3 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd IndexOptions Page 1 NCSA HTTPd IndexOptions Page 2

IndexOptions FancyIndexing IconsAreLinks


IndexOptions directive This will turn on fancy indexing with icons, and the icons will be part of the links to
the files.

Purpose
1
This directive specifies whether you want fancy directory indexing (with icons and Return to Resource Configuration File Overview
file sizes) or standard directory indexing, and which options you want active for 2
indexing. NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95
If your documents are being served from an AFS drive, you will want to seriously
consider turning fancy indexing off.

Syntax
IndexOptions opt1 opt2...
opt is an option name:
FancyIndexing turns FancyIndexing on
IconsAreLinks makes the icons part of the anchor for the filename
ScanHTMLTitles will cause HTTPd to fill in the description field of any
unknown HTML document with its title (title must be within 256 bytes of the
start of the file). You should NOT turn this option on unless your server has
CPU time to spare.
SuppressLastModified will cause HTTPd not to print the last date of
modification in index listings.
SuppressSize will cause HTTPd not to print the size of the files in index
listings.
SuppressDescription will cause HTTPd not to print descriptions for
any files.
Only one IndexOptions directive should appear in the configuration file.

File
[Link]

Default
If no IndexOptions directive is present, HTTPd assumes that none of the options
should be on.

Example 1
2
[Link]
[Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd ReadmeName Page 1

ReadmeName directive

Purpose
This directive specifies what filename HTTPd should look for when indexing a
directory, in order to add a paragraph of description to the end of the index it
automatically generates. Generally these paragraphs are used to give a general
overview of what’s in a directory.

Syntax
ReadmeName name
name is the name of the file HTTPd should look for when trying to find a
description file. HTTPd will first look for [Link], and if found, will display
the HTML inlined with its own index. If it finds name, it will include the file as
plaintext.
Only one ReadmeName directive should appear in the configuration file.

File
[Link]

Default
If no ReadmeName is present, HTTPd assumes nothing.

Example
ReadmeName README
When generating an index for the directory /foo, HTTPd will look for
/foo/[Link], and will insert it if found. It will then look for
/foo/README and insert it if found. If it finds nothing, it will include nothing.

1
Return to Resource Configuration File Overview
2
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

1 [Link]
2 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd Redirect Page 1

Redirect directive

Purpose
1
The Redirect directive creates a virtual document on your server, and any accesses to
it will be redirected to a new URL.

Syntax
Redirect virtual URL
2
virtual is the translated location which should trigger a redirect..
3
URL is the URL of the new document.
Several Redirect directives may appear in the configuration file.

File
[Link]

Example
Redirect /dir1 [Link]
This would cause requests for /dir1 to be redirected to the new location,
[Link]

4
Return to Resource Configuration File Overview
5
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

1 ../[Link]#Directive
2 ../admin/[Link]
3 [Link]
4 [Link]
5 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd ScriptAlias Page 1 NCSA HTTPd ScriptAlias Page 2
7−12−95

ScriptAlias directive

Purpose
1
The ScriptAlias directive creates a virtual directory on your server. Any accesses to 2
that virtual directory will be satisfied by returning the output of a CGI server script
in that directory.

Syntax
ScriptAlias virtual path
3
virtual is the translated location of the script directory.
path is the full pathname of the directory which contains server scripts which
fulfill the request.
Note: You should always place a trailing / after ScriptAlias directives which
reference directories, to prevent similar entries from conflicting with each other.
Several ScriptAlias directives may appear in the configuration file.

File
[Link]

Example
ScriptAlias /cgi−bin/ /usr/local/etc/httpd/cgi−bin/
This would cause requests such as /cgi−bin/foo to be satisfied by running the
script /usr/local/etc/httpd/cgi−bin/foo.
Thus, if someone requested /cgi−bin/a−script, the server would run
/usr/local/etc/httpd/cgi−bin/a−script and send its output to the
client.

4
Return to Resource Configuration File Overview
5
NCSA HTTPd Development Team / httpd@[Link] / Last Modified

1 ../[Link]#Directive
2 /cgi/
3 ../admin/[Link]
4 [Link]
5 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd UserDir Page 1

UserDir directive

Purpose
1
The UserDir directive sets the real directory in a user’s home directory to index upon
2
receiving a request from a user supported directory.

Syntax
UserDir dir
Where dir is a partial path relative to the users home directory (as given in
/etc/passwd). The server takes the path it creates with this information, and
looks for the user’s document in the resulting full path.
The keyword DISABLED will disable the user supported directories feature.
Only one UserDir directive is allowed in the server configuration file.

File
[Link]

Default
If you do not specify a UserDir, HTTPd assumes:
UserDir public_html

Example
UserDir web−docs
This would set UserDir to web−docs. A request for /~robm/[Link] would
cause the server to retrieve ~robm/web−docs/[Link].

3
Return to Resource Configuration File Overview

1 ../[Link]#Directive
2 ../../info/[Link]
3 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd Access Configuration Page 1 NCSA HTTPd Access Configuration Page 2

Access Configuration
Directives
8
In addition to the general information which applies to all NCSA HTTPd 9
configuration files, the access control files support the notion of sectioning directives.
Overview
10
This is a list of the directives and sectioning directives used when writing an ACF.
When creating a document tree, NCSA HTTPd allows you to control certain aspects Each directive specifies where it can be used, and gives examples of usage.
of the branches (directories) of that tree.
11

Access Directory 12
Options 13

Restrict access to a branch to allowed hosts or authenticated users. AllowOverride 14


AddType 15

Server features DefaultType 16


AddEncoding 17
1
Branches considered unsafe (such as users’ home directories) can be made AddDescription 18
more secure by disabling certain server functions in those directories. AddIcon 19
IndexIgnore 20
DefaultIcon 21
ReadmeName 22
Related tutorials AuthName 23
AuthType 24
There are many aspects of server administration regarding security and access
2
AuthUserFile 25
control. Please read this tutorial on setting up a secure server. Also, here is a quick
3
AuthGroupFile
26
overview of setting up user authentication, which you may find helpful. If multiple
4
Limit 27
users are using your server, this tutorial on user management may also be helpfull. order 28
deny 29
allow 30
require 31
Methods satisfy
There are two methods for controlling access to directories.
Global Access Configuration file Example Configuration Files
A document in your server’s conf directory, specified by the Server
5
32
For the security demo, I used this Global access configuration file.
33

Configuration directive AccessConfig, controls access to any directory in


your tree. 8 ../[Link]
9 [Link]
10 ../[Link]#Directive

HTTPd requires that you set up the Global ACF. 11 [Link]


12 [Link]
13 [Link]
Per−directory Access Configuration file 14 [Link]
15 [Link]
16 [Link]
Within your document tree, files with the name specified by the
6 7
17 [Link]
18 [Link]
AccessFileName directive in the Resource Configuration File control access 19 [Link]
to the directory they are in as well as any subdirectories. 20 [Link]
21 [Link]
22 [Link]
Per−directory ACFs are optional. They can be restricted or completely 23 [Link]
24 [Link]
forbidden by the Global ACF. 25 [Link]
26 [Link]
1 ../../info/[Link] 27 [Link]
2 ../../tutorials/[Link] 28 [Link]
3 ../../tutorials/[Link] 29 [Link]
4 ../admin/[Link] 30 [Link]
5 ../httpd/[Link] 31 [Link]
6 ../srm/[Link] 32 ../../info/[Link]
7 ../srm/[Link] 33 [Link]

[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd Access Configuration Page 3
34
The same effect could be achieved by taking everything within each Directory
section, and placing the directives in a ACF in each particular directory.

35
Return to Configuration Instructions
36
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

34 [Link]
35 ../[Link]
36 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AddDescription Page 1

AddDescription directive

Purpose
1 2
The AddDescription directive acts exactly as it does in the resource configuration file.

Scope
This directive applies to only the per−directory ACFs.

Syntax
3
See the description from the resource configuration section.

File
[Link]

4
Return to access configuration overview
5
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

1 ../[Link]#Directive
2 ../srm/[Link]
3 ../srm/[Link]
4 [Link]#Directives
5 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AddEncoding Page 1

AddEncoding directive

Purpose
1 2
The AddEncoding directive acts exactly as it does in the resource configuration file.

Scope
This directive applies to both the Global ACF as well as per−directory ACFs.

Syntax
3
See the description from the resource configuration section.

File
[Link]

4
Return to access configuration overview
5
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

1 ../[Link]#Directive
2 ../srm/[Link]
3 ../srm/[Link]
4 [Link]#Directives
5 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AddIcon Page 1

AddIcon directive

Purpose
1 2
The AddIcon directive acts exactly as it does in the resource configuration file.

Scope
This directive applies to both the Global ACF as well as per−directory ACFs.

Syntax
3
See the description from the resource configuration section.

File
[Link]

4
Return to access configuration overview
5
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

1 ../[Link]#Directive
2 ../srm/[Link]
3 ../srm/[Link]
4 [Link]#Directives
5 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AddType Page 1

AddType directive

Purpose
1 2
The AddType directive acts exactly as it does in the resource configuration file.

Scope
This directive applies to both the Global ACF as well as per−directory ACFs.

Syntax
3
See the description from the resource configuration section.

File
[Link]

4
Return to access configuration overview
5
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

1 ../[Link]#Directive
2 ../srm/[Link]
3 ../srm/[Link]
4 [Link]#Directives
5 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AllowOverride Page 1 NCSA HTTPd AllowOverride Page 2
Limit
9

AllowOverride directive Allow use of the Limit sectioning directive.


Redirect
10
Allow use of the Redirect directive.
Purpose
1
The AllowOverride directive controls which access control directives can be
overruled by a per−directory ACF. File
The global ACF cannot be restricted by this directive. [Link]

Scope Default
If no AllowOverride directives are given for this directory or any of its parents,
This directive may appear only in the global ACF. HTTPd assumes:
AllowOverride All
Syntax
AllowOverride or1 or2 ... orn
Example
Each or is one of the following: AllowOverride Limit FileInfo
None ACFs in this directory are allowed to use Limit, AddType, and AddEncoding.
ACFs are not allowed in this directory.
All 11
Return to access configuration overview
ACFs are unrestricted in this directory.
12
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
Options 7−12−95
2
Allow use of the Options directive.
FileInfo
3 4
Allow use of the AddType and AddEncoding directives.
AuthConfig
Allow use of these directives: 5
AuthName 6
AuthType 7
AuthUserFile 8
AuthGroupFile
1 ../[Link]#Directive
2 [Link]
3 [Link]
4 [Link]
5 [Link] 9 [Link]
6 [Link] 10 ../srm/[Link]
7 [Link] 11 [Link]#Directives
8 [Link] 12 [Link]

[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AuthGroupFile Page 1 NCSA HTTPd AuthGroupFile Page 2
7
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
AuthGroupFile 7−12−95

Purpose
1
The AuthGroupFile directive sets the file to use as a list of user groups for user
authentication.

Scope
This directive applies to both global and per−directory ACFs.
2 3 4
This directive must be accompanied by AuthName, AuthType, and AuthUserFile
directives in order for user authentication to work properly.

Syntax
AuthGroupFile path
5
path is the absolute path of group file to use in this directory.

File
[Link]

Default
There is no default.

Example
AuthGroupFile /usr/local/etc/httpd/conf/.htgroup
Sets the authorization group file for this directory to
/usr/local/etc/httpd/conf/.htgroup.

6
Return to access configuration overview
1 ../[Link]#Directive
2 [Link]
3 [Link]
4 [Link]
5 ../admin/[Link]#group
6 [Link]#Directives 7 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AuthName Page 1 NCSA HTTPd AuthName Page 2
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
6
7−12−95
AuthName

Purpose
1
The AuthName directive sets the name of the authorization realm for this directory.
This realm is a name given to users so they know which username and password to
send.

Scope
This directive applies to both global and per−directory ACFs.
2 3 4
This directive must be accompanied by AuthType, AuthUserFile, and AuthGroupFile
directives in order for user authentication to work properly.

Syntax
AuthName name
Where name is a short name describing this authorization realm. Can contain spaces.

File
[Link]

Default
There is no default.

Example
AuthName PhysicsCollab
Sets the authorization name of this directory to PhysicsCollab.

5
Return to access configuration overview

1 ../[Link]#Directive
2 [Link]
3 [Link]
4 [Link]
5 [Link]#Directives 6 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AuthType Page 1 NCSA HTTPd AuthType Page 2
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
6
7−12−95
AuthType

Purpose
1
The AuthType directive sets the type of authorization used in this directory.

Scope
This directive applies to both global and per−directory ACFs.
2 3
This directive must be accompanied by AuthName, AuthUserFile, and
4
AuthGroupFile directives in order for user authentication to work properly.

Syntax
AuthType type
type is the authentication type to use for this directory. Only Basic is currently
implemented.

File
[Link]

Default
There is no default.

Example
AuthType Basic
Sets the authorization type of this directory to Basic.

5
Return to access configuration overview

1 ../[Link]#Directive
2 [Link]
3 [Link]
4 [Link]
5 [Link]#Directives 6 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd AuthUserFile Page 1 NCSA HTTPd AuthUserFile Page 2

6
Return to access configuration overview
AuthUserFile
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7
7−12−95
Purpose
1
The AuthUserFile directive sets the file to use as a list of users and passwords for
user authentication.

Scope
This directive applies to both global and per−directory ACFs.
2 3 4
This directive must be accompanied by AuthName, AuthType, and AuthGroupFile
directives in order for user authentication to work properly.

Syntax
AuthUserFile path
5
path is the absolute path of a user file created with the htpasswd support
program.

File
[Link]

Default
There is no default.

Example
AuthUserFile /usr/local/etc/httpd/conf/.htpasswd
Sets the authorization user file for this directory to
/usr/local/etc/httpd/conf/.htpasswd.

1 ../[Link]#Directive
2 [Link]
3 [Link]
4 [Link] 6 [Link]#Directives
5 ../admin/[Link]#htpasswd 7 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd DefaultIcon Page 1

DefaultIcon directive

Purpose
1 2
The DefaultIcon directive acts exactly as it does in the resource configuration file.

Scope
This directive applies to both the Global ACF as well as per−directory ACFs.

Syntax
3
See the description from the resource configuration section.

File
[Link]

4
Return to access configuration overview
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
5
7−12−95

1 ../[Link]#Directive
2 ../srm/[Link]
3 ../srm/[Link]
4 [Link]#Directives
5 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd DefaultType Page 1

DefaultType directive

Purpose
1 2
The DefaultType directive acts exactly as it does in the resource configuration file.

Scope
This directive applies only to per−directory ACFs.

Syntax
3
See the description from the resource configuration section.

File
[Link]

4
Return to access configuration overview
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
5
7−12−95

1 ../[Link]#Directive
2 ../srm/[Link]
3 ../srm/[Link]
4 [Link]#Directives
5 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd Directory Page 1 NCSA HTTPd Directory Page 2

NCSA HTTPd Development Team / httpd@[Link] / Last Modified


5
Directory directive 7−12−95

Purpose
1
Directory is a sectioning directive which controls the directory to which access
control directives apply.

Scope
2
This directive applies only to the Global ACF. All directives in the Global ACF must
be contained in a Directory section.

Syntax
Opening Directive:
<Directory dir>
dir is the absolute pathname of the directory you are protecting. If you are using
3
NCSA HTTPd 1.2 or later, this can also be a wildcard expression of a set of
directories you wish to protect.
Closing directive:
</Directory>

File
[Link]

Example
<Directory /u/Web>
Options None
</Directory>
The directives contained within the Directory section above would only apply to the
server directory /u/Web.

4
Return to access configuration overview
1 [Link]
2 ../[Link]#Directive
3 ../[Link]
4 [Link]#Directives 5 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd IndexIgnore Page 1

IndexIgnore directive

Purpose
1 2
The IndexIgnore directive acts exactly as it does in the resource configuration file.

Scope
This directive applies to both the Global ACF as well as per−directory ACFs.

Syntax
3
See the description from the resource configuration section.

File
[Link]

4
Return to access configuration overview
5
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

1 ../[Link]#Directive
2 ../srm/[Link]
3 ../srm/[Link]
4 [Link]#Directives
5 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd Limit Page 1 NCSA HTTPd Limit Page 2
[Link]

Limit directive
Example
<Limit GET>
order deny,allow
Purpose deny from all
1
allow from .[Link]
Limit is a sectioning directive which controls which clients can access a directory. require group sdg
</Limit>
The only clients allowed to use the GET method in this directory must be from
Scope [Link], and authenticate to group sdg.

This directive applies to both the global and per−directory ACFs.


6
Return to access configuration overview
Syntax 7
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
Opening Directive: 7−12−95

<Limit meth1 meth2 ... methn>


Each meth is one of the following methods:
GET
Allows clients to retrieve documents and execute scripts.
PUT
Not Implemented.
POST
Not fully implemented. Currently, allows clients to use POST scripts.
Closing directive:
</Limit>
Only the following directives are allowed inside Limit sections:
2
order 3
deny 4
allow 5
require

File
1 [Link]
2 [Link]
3 [Link]
4 [Link] 6 [Link]#Directives
5 [Link] 7 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd Options Page 1 NCSA HTTPd Options Page 2
option disables ONLY the server−generated indexes. It does not stop the
server from sending any precompiled index file it may find in there (the name
5
Options directive of which depends on DirectoryIndex).
IncludesNoExec
6 7
This enables server side includes in the directory, but disables the exec
Purpose feature.
1
The Options directive controls which server features are available in a given
directory.
File
[Link]
Scope
This directive applies to both the Global ACF as well as per−directory ACFs.
Default
If no Options directives are given for this directory or any of its parents, HTTPd
assumes:
Syntax
Options opt1 opt2 ... optn Options All

Each opt is one of the following:


None Example
No features are enabled for in directory. Options Indexes FollowSymLinks

All The server would allow users to index this directory and its subdirectories, and would
allow symbolic links to be used within.
All features are enabled for in directory.
FollowSymLinks
8
Return to access configuration overview
The server will follow symbolic links in this directory.
9

SymLinksIfOwnerMatch NCSA HTTPd Development Team / httpd@[Link] / Last Modified


7−12−95
The server will only follow symbolic links for which the target file/directory
is owned by the same user id as the link.
ExecCGI
2
Execution of CGI scripts is allowed in this directory.
Includes
3
Server side include files are enabled in this directory.
Indexes
4
The server allows users to request indexes in this directory. Disabling this
5 ../srm/[Link]
1 ../[Link]#Directive 6 ../../tutorials/[Link]
2 ../../tutorials/[Link] 7 ../../tutorials/[Link]#exec
3 ../../tutorials/[Link] 8 [Link]#Directives
4 ../../info/[Link] 9 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd ReadmeName Page 1

ReadmeName directive

Purpose
1 2
The ReadmeName directive acts exactly as it does in the resource configuration file.

Scope
This directive applies to both the Global ACF as well as per−directory ACFs.

Syntax
3
See the description from the resource configuration section.

File
[Link]

4
Return to access configuration overview
5
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

1 ../[Link]#Directive
2 ../srm/[Link]
3 ../srm/[Link]
4 [Link]#Directives
5 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd sectioning directives Page 1

Sectioning directives

Definition
Some access control directives require that certain information apply to all directives
in a given section. These directives are called sectioning directives.
1
The formatting of these directives is similar to HTML tags.
For each sectioning directive, there must be two components: an opening directive,
and a closing directive.
For instance, for the sectioning directive Foo, with one argument data, the opening
directive would be:
<Foo data>
The closing argument would be:
</Foo>
The information given in the opening directive will affect all other directives
between the opening and closing sectioning directive.

File
[Link]

Example
The emphasized words are here for clarification; they would not appear in the actual
configuration file.
<Directory /u/Web> The opening directive
require group physics
</Directory> The closing directive
Directory is the sectioning directive. Therefore, the information given by the
opening directive, /u/Web, applies to the require directive within.

2
Return to access configuration overview
3
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95
1 [Link]
2 [Link]#Directives
3 [Link]
[Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd allow Page 1 NCSA HTTPd allow Page 2

allow directive Example


<Limit /u/Web>
order deny,allow
deny from all
Purpose allow from .[Link]
</Limit>
The allow directive affects which hosts can access a given directory with a given
method. In the /u/Web directory, the server evaluates the deny directive first. So, everyone is
denied. It then evaluates the allow directive, and decides to allow clients from
.[Link].

Scope
1
This directive is only available within Limit sections. Return to access configuration overview
2

3
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95
Syntax
allow from host1 host2 ... hostn
host is one of the following:
A domain name
A domain name, like .[Link], which host names must end in to be
allowed.
A host name A full host name.
A full IP address
An IP address of a host.
A partial IP address
The first 1−3 bytes of an IP address, for subnet restriction.
The keyword all
This means that all hosts will be allowed.

File
[Link]

Default
No default applies.
2 [Link]#Directives
1 [Link] 3 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd deny Page 1 NCSA HTTPd deny Page 2

deny directive Example


<Limit /u/Web>
order deny,allow
deny from all
Purpose allow from .[Link]
</Limit>
The deny directive affects which hosts can access a given directory with a given
method. In the /u/Web directory, the server evaluates the deny directive first. So, everyone is
denied. It then evaluates the allow directive, and decides to allow clients from
.[Link].

Scope
1
This directive is only available within Limit sections. Return to access configuration overview
2

3
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95
Syntax
deny from host1 host2 ... hostn
host is one of the following:
A domain name
A domain name, like .[Link], which host names must end in to be
allowed.
A host name A full host name.
A full IP address
An IP address of a host.
A partial IP address
The first 1−3 bytes of an IP address, for subnet restriction.
The keyword all
This means that all hosts will be denied.

File
[Link]

Default
No default applies.
2 [Link]#Directives
1 [Link] 3 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd order Page 1 NCSA HTTPd order Page 2

Example
order directive <Limit GET>
order deny,allow
deny from all
allow from .[Link]
Purpose </Limit>
1 2
The order directive affects the order in which deny and allow directives are evaluated In the /u/Web directory, the server evaluates the deny directive first. So, everyone is
within a Limit section. denied. It then evaluates the allow directive, and decides to allow clients from
.[Link].

Scope 4
3 Return to access configuration overview
This directive is only available within Limit sections.
5
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95
Syntax
order ord
ord is one of the following:
deny,allow
In this case, the deny directives are evaluated before the allow directives.
allow,deny
In this case, the allow directives are evaluated before the deny directives.
mutual−failure
This order is a bit unorthodox. With this order, you specify specific hosts
which must be allowed or denied. Any host appearing on the allow list is
allowed, and any list on the deny list is denied. Any appearing on neither is
denied.

File
[Link]

Default
If no order is given, HTTPd assumes:
order deny,allow

1 [Link]
2 [Link] 4 [Link]#Directives
3 [Link] 5 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd require Page 1 NCSA HTTPd require Page 2

Example
require directive <Limit GET PUT>
order deny,allow
deny from all
allow from .[Link]
Purpose require user ls
require group sdg
The require directive affects which authenticated users can access a given directory </Limit>
with a given method. In this directory, the server evaluates the deny directive first. So, everyone is denied.
It then evaluates the allow directive, and decides to allow clients from .[Link].
Now, it uses user authentication and only allows users who are named ls or are in the
Scope group sdg.
1
This directive is only available within Limit sections.
5
Return to access configuration overview
Syntax 6
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95
require entity en1 en2 ... enn
en are entity names, separated by spaces.
entity is one of the following:
user
2
Only the named users can access this directory with the given methods.
group
3
Only users in the named groups can access this directory with the given
methods.
valid−user
4
All of the users defined in the AuthUserFile are allowed access upon
providing a valid password.

Default
No default applies.

File
[Link]

1 [Link]
2 ../admin/[Link]
3 ../admin/[Link]#group 5 [Link]#Directives
4 [Link] 6 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995
NCSA HTTPd satisfy Directive Page 1 NCSA HTTPd satisfy Directive Page 2
In this directory, the server evaluates the deny directive first. So, everyone is denied.
It then evaluates the allow directive, and decides to allow clients from .[Link].
Satisfy directive With the satisfy any, if you are from .[Link], access is granted. Otherwise, it
uses user authentication and only allows users who are named ls.

Purpose 4
Return to access configuration overview
The satisfy directive allows you to specify how access is allowed if you use both
1 2
allow and require directives. 5
NCSA HTTPd Development Team / httpd@[Link] / Last Modified
7−12−95

Scope
3
This directive is only available within Limit sections.

Syntax
Satisfy all | any
all
In order to gain access to a directory, the user must satisfy both the allow and
require directives.
any
Users are only required to meet one of the specified allow or require
directives.

Default
The default is all.

File
[Link]

Example
<Limit GET PUT>
order deny,allow
deny from all
allow from .[Link]
require user ls
satisy any
</Limit>

1 [Link]
2 [Link] 4 [Link]#Directives
3 [Link] 5 [Link]
[Link] Printed Tue Dec 5 [Link] 1995 [Link] Printed Tue Dec 5 [Link] 1995

You might also like