Apache Quick Reference Card
Apache Quick Reference Card
com
Revision 1.6 for Apache version 1.3.6 AddModuleInfo module text E cv 1.3 ListenBacklog number (511) C c 1.3
Andrew Ford refcards.com TM ExtendedStatus On Off (Off) E c 1.3 LimitRequestBody nbytes C cvda 1.3
Sectional directives LimitRequestFields number (100) C c 1.3
This card summarizes information in the Apache documentation, <Directory pattern ~ regex > ... </Directory> C cv 1.3 LimitRequestFieldSize nbytes (8190) C c 1.3
LimitRequestLine nbytes (8190) C c 1.3
<Files pattern ~ regex > ... </Files>
which can be found at http://www.apache.org/docs/ . <DirectoryMatch regex> ... </DirectoryMatch> C cv 1.3
C cvda 1.3 SendBufferSize bytes Cc
Each directive is listed with its arguments. Defaults are given
RLimitCPU secs max secs max C cvda
<Location pattern ~ regex > ... </Location>
where appropriate in parentheses at the end of the line, followed <FilesMatch regex> ... </FilesMatch> C cvda 1.3
C cv 1.3 RLimitMEM bytes max bytes max C cvda
by an indication of the status of the directive (C – core, B – base, RLimitNPROC nprocs max nprocs max C cvda
E – extension) and the contexts in which the directive is valid (c – <LocationMatch regex> ... </LocationMatch> C cv 1.3
ThreadsPerChild number (50) C c 1.3
in a configuration file, v – within a virtual host section, d – within <VirtualHost pattern> ... </VirtualHost> Cc
-d directory initial value for ServerRoot env=[! var] LanguagePriority MIME-language ... B cvda
-D parameter define parameter for <IfDefine> TransferLog file-or-pipe (logs/access_log ) B cv XBitHack On Off Full (Off) B cvda
-f file configuration file (conf/httpd.conf ) HostnameLookups On Off Double (Off) C cvd 1.3 MetaFiles On Off (Off) E cvda 1.3
-C directive process directive before reading config files 1.3 RefererIgnore hostname ... E cv MetaDir dir-name (.web) E cvda 1.3
-c directive process directive after reading config files 1.3 LogFormat format-string ("%h %l %u %t "%r " %s %b") B cv 1.3 MetaSuffix suffix (.meta) E cvda 1.3
-L list available configuration directives and exit
1.3 format-name MimeMagicFile filename E cv 1.3
list compiled-in modules and exit
-l 1.3 LogLevel emerg alert crit error warn notice (error) C cv 1.3 ContentDigest On Off (Off) C cvda
-S show vhost settings info debug ExpiresActive On Off E cvda
-t test syntax of configuration files and exit format-string can contain literal text and format specifiers: ExpiresBytype MIME-type expiry-code E cvda
-v print version and build date, and exit %a Remote IP address ExpiresDefault expiry-code E cvda
-V show compilation settings and exit 1.3 %b Number of bytes sent (excluding headers) Header set append add unset header value E cvda
-X single-processs debug mode %{var}e Environment variable value Mapping directives
General configuration directives
DocumentRoot directory (/usr/local/apache/htdocs) C cv
%f
%h
Filename
Remote host
Action MIME-type handler-name script B cvda
Alias url-path real-path B cv
%{hdr}i Incoming header value
ServerRoot directory (/usr/local/apache ) C c AliasMatch url-regex path-replacement B cv 1.3
%l Remote logname (from identd)
AccessConfig filename (conf/access.conf ) C cv ErrorDocument error-code string url C cvda
%{label}n Labelled note from another module 1.3
ResourceConfig filename (conf/srm.conf ) C cv UserDir directory DISABLED user ... (public_html ) B cv 1.3
%{hdr}o Outgoing header value
Include filename C cvd 1.3 ENABLED user ...
%p Canonical port number of server
TypesConfig filename (conf/mime.types ) B c Redirect status url-path url B cvda
PidFile filename (logs/httpd.pid ) C c
%P Process ID of child server process
RedirectMatch status url-regex dest-url B cv 1.3
LockFile filename (logs/accept.lock ) C c
%r First line of request
RedirectPermanent url-path url-dest B cvda
ScoreBoardFile file (logs/apache_status ) C c
%s Status
RedirectTemp url-path url-dest B cvda
%t Time in Common Log Format (CLF) format
ServerAdmin email-addr C cv Script method script B cvd
ServerType inetd standalone (standalone ) C c
%{format}t Time (format is strftime format)
ScriptAlias url-path script-dir B cv
(determined automatically) C cv
%T Time taken to serve the request (in seconds)
ServerName name ScriptAliasMatch url-regex script-dir B cv 1.3
%u Remote username
ServerAlias fqdn ... Cv AddHandler handler-name extension ... B cvda
ServerSignature On Off Email (Off) C cvda 1.3
%U URL requested
RemoveHandler extension ... B da 1.3
%v Canonical ServerName of server
ServerPath pathname Cv SetHandler handler-name B da
%V Server name as per UseCanonicalName setting 1.3
ServerTokens Min imal OS Full (Full) C c 1.3 ImapBase map referer url (http://server ) B cvda
Performance tuning directives
BindAddress * IP-addr fqdn (*) C c ImapDefault error nocontent referer menu (nocontent ) B cvda
Listen IP-addr: port-number Cc Timeout secs (300) C c url
Port portno (80) C c KeepAlive On Off (On) C c ImapMenu none formatted semiformatted unformatted B cvda
User username #userid (#-1) C cv KeepAliveTimeout seconds (15) C c RewriteBase url E cvda
Group group-name #group-id (#-1) C cv MaxKeepAliveRequests number (100) C c RewriteCond test-string cond-pattern flags E cvda
NameVirtualHost addr :port Cc 1.3 MaxClients number (256) C c RewriteEngine On Off (Off) E cvda
UseCanonicalName On Off (On) C cvda 1.3 MaxRequestsPerChild number Cc RewriteLock filename E cv 1.3
CoreDumpDirectory directory (as ServerRoot ) C c 1.3 ExcessRequestsPerChild number Ec 1.3 RewriteLog filename E cv
IdentityCheck On Off (Off) C cvd MaxSpareServers number (10) C c RewriteLogLevel digit E cv
1 2 3
http://books24x7.blogspot.com
Indexes, Limit, Options HTTP_USER_AGENT Client software identification
Options +feature -feature ... (All) C cvda MOD_PERL Defined if running under mod_perl
Valid options are: None, All, ExecCGI, FollowSymLinks , Server Side Includes (SSI)
Includes, IncludesNOEXEC , Indexes, MultiViews , Format is: <!--#element attr=value ... -->
SymLinksIfOwnerMatch Elements are: Apache Quick Reference Card
AuthName realm-name C da config controls parsing; attributes: errmsg, sizefmt (one of A refcards.com TM quick reference card.
AuthType type C da bytes or abbrev), timefmt (strftime format) Revision 1.6 for Apache version 1.3.6 [May 1999]
AuthUserFile filename E da echo print the value of a variable; attribute var (can be
Published by Ford & Mason Ltd.
AuthGroupFile filename E da a CGI variable or one of: DATE_GMT, DATE_LOCAL , c 1998, 1999 Ford & Mason Ltd. All rights reserved.
AuthAuthoritative On Off (On) B da DOCUMENT_NAME , DOCUMENT_URI or LAST_MODIFIED ) Permission is granted to print and duplicate this card for persional or in-
allow from all host ... env=var B da set set the value of a variable; attributes: var, value dividual, internal business use. Copies of this card (& others) can be or-
deny from all host ... env=var B da printenv print a list of all variables and their values dered through our web site: http://www.refcards.com, which also has
order allow,deny deny,allow (deny,allow ) B da exec execute a shell command or CGI script; attribute: cmd versions available for downloading.
mutual-failure or cgi (IncludesNOEXEC option disables exec) Please send feedback to: [email protected]
Require user user ... group group ... valid-user C da fsize print size of file; attribute: file or virtual refcards.com is a trademark of Ford & Mason Ltd.
Satisfy All Any (All) C da flastmod print file modification time; attribute file or virtual The Apache feather is used with permission of the Apache Group.
4 5 6