Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Apache refcard

759 views

Published on

  • Be the first to comment

  • Be the first to like this

Apache refcard

  1. 1. ClearModuleList Cc MinSpareServers number (5) C c Apache Quick Reference Card AddModule module ... Cc StartServers number (5) C c 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 ¤ £ ¢ LimitRequestFieldSize nbytes (8190) C c 1.3 This card summarizes information in the Apache documentation, <Directory pattern ~ regex > ... </Directory> C cv 1.3 LimitRequestLine nbytes (8190) C c 1.3 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 <Files pattern ~ regex > ... </Files> where appropriate in parentheses at the end of the line, followed <FilesMatch regex> ... </FilesMatch> C cvda 1.3 RLimitCPU secs max ¦ ¤ £ ¢ ¨¤ £ ¢ secs max ¥ C cvda by an indication of the status of the directive (C – core, B – base, ¤ £ ¢ <Location pattern ~ regex > ... </Location> C cv 1.3 RLimitMEM bytes max ¦ ¤ £ ¢ ©¤ £ ¢ bytes max ¥ C cvda E – extension) and the contexts in which the directive is valid (c – <LocationMatch regex> ... </LocationMatch> C cv 1.3 RLimitNPROC nprocs max¦¤ £ ¢ ©¤ £ ¥ nprocs max ¢ C cvda Cc ThreadsPerChild number (50) C c 1.3 in a configuration file, v – within a virtual host section, d – within <VirtualHost pattern> ... </VirtualHost> a directory section, a – in an access control file). ¦¥ <IfDefine ! parameter> ... </IfDefine> C cvda 1.3 File typing directives Options and directives that are new for Apache 1.3 are marked 1.3 , ¦¥ <IfModule ! module> ... </IfModule> C cvda DefaultType MIME-type (text/html ) C cvda while those that have changed are marked 1.3. <Limit method> ... </Limit> C cvda ForceType MIME-type B da <LimitExcept method> ... </LimitExcept> C cvda AddEncoding MIME-encoding extension ... B cvda Command line options       Logging directives AddLanguage MIME-language extension ... B cvda httpd -d directory -f file -C directive   -c directive -L -l -S -v -V -X ¡   ¡   ¡   ¡ ¡   ¡   ¡¡ ¡  ¡ ¢ £ ErrorLog file syslog :facility ¥(logs/error_log ) C cv ¦¤ 1.3 AddType MIME-type extension ... B cvda CustomLog file-or-pipe format-string format-name ¢ B cv £ ¤ 1.3 DefaultLanguage MIME-language (no default language ) C cvda 1.3 -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 -l list compiled-in modules and exit 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 %f Filename DocumentRoot directory (/usr/local/apache/htdocs) C cv %h Remote host ¢ Action MIME-type handler-name script £ B cvda ¤ Alias url-path real-path B cv ServerRoot directory (/usr/local/apache ) C c %{hdr}i Incoming header value AliasMatch url-regex path-replacement B cv 1.3 (conf/access.conf ) C cv %l Remote logname (from identd) AccessConfig filename (conf/srm.conf ) C cv %{label}n Labelled note from another module 1.3 ErrorDocument error-code string url C cvda ¢ ¤ £ ResourceConfig filename %{hdr}o Outgoing header value ¢ UserDir directory DISABLED user ... £ (public_html ) B cv ¥ £¦ 1.3 Include filename C cvd 1.3 %p Canonical port number of server ENABLED user ... ¤ TypesConfig filename (conf/mime.types ) B c %P Process ID of child server process ¥ Redirect status url-path url ¦ B cvda PidFile filename (logs/httpd.pid ) C c %r First line of request ¥ RedirectMatch status url-regex dest-url ¦B cv 1.3 LockFile filename (logs/accept.lock ) C c RedirectPermanent url-path url-dest B cvda ScoreBoardFile file (logs/apache_status ) C c %s Status RedirectTemp url-path url-dest B cvda ServerAdmin email-addr C cv %t Time in Common Log Format (CLF) format 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 Cv %u Remote username ServerAlias fqdn ... AddHandler handler-name extension ... B cvda ServerSignature On Off Email £ £ ¢ ¤(Off) C cvda 1.3 %U URL requested RemoveHandler extension ... B da 1.3 ServerPath pathname Cv %v Canonical ServerName of server SetHandler handler-name B da ¤ £ £¦ ¥ ¢ %V Server name as per UseCanonicalName setting 1.3 ServerTokens Min imal OS Full ¤ £ £ ¢ (Full) C c 1.3 Performance tuning directives ¢ ImapBase map referer url £ (http://server ) B cvda ¤ £ 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
  2. 2. RewriteMap map-name map-type:map-source E cv 1.3 Proxy/cache directives include include another document; attribute file or virtual RewriteOptions option E cvda ¢ £ £ NoProxy host domain ip-addr subnet ... £ ¤ E cv 1.3 if conditional; attribute: expr RewriteRule pattern substitution flags ¥ ¦ E cvda 1.3 AllowCONNECT port ... (443 563) E cv 1.3 elif conditional; attribute: expr £ ¢ ProxyBlock * host domain ...£ ¤ E cv else conditional Scripting directives endif conditional ProxyDomain domain-name E cv 1.3 BrowserMatch regexp var =value ...¥ ¦ B cv ProxyPass path url E cv HTTP 1.1 status codes BrowserMatchNoCase regexp var =value ... ¥ B cv ¦ ProxyPassReverse path url E cv 1.3 100 Continue 404 Not found PassEnv varname ... B cv 101 Switching protocols 405 Method not allowed ProxyReceiveBufferSize number-bytes E cv 1.3 SetEnv varname value B cv 200 OK 406 Not acceptable ProxyRemote match remote-server E cv SetEnvIf attribute regex var =value ... ¥ B cv ¦ 1.3 ¤ £ ¢ ProxyRequests On Off (Off) E cv 201 Created 407 Proxy authentication required SetEnvIfNoCase attribute regex var =value ... B cv ¥ ¦ 1.3 £ £ ¢ ProxyVia On Off Full Block £ ¤ (Off) E cv 1.3 202 Accepted 408 Request timeout UnsetEnv varname ... B cv 203 Non-authoritative information 409 Conflict CacheDefaultExpire hours (1) E cv ScriptLog filename Bc 204 No content 410 Gone CacheDirLength number (1) E cv ScriptLogBuffer size-bytes (1024) B c 205 Reset content 411 Length required CacheDirLevels number (3) E cv ScriptLogLength length-bytes (10385760) B c 206 Partial content 412 Precondition failed CacheForceCompletion percentage-complete (90) E cv 1.3 Directory indexing directives CacheGcInterval hours E cv 300 Multiple choices 413 Request entity too large CacheLastModifiedFactor factor (0.1) E cv 301 Moved permanently 414 Request-URI too long DirectoryIndex file ... (index.html ) B cvda CacheMaxExpire hours (24) E cv 302 Moved temporarily 415 Unsupported media type ReadmeName filename B cvda CacheRoot directory E cv 303 See other 500 Internal server error HeaderName filename B cvda CacheSize kb (5) E cv 304 Not modified 501 Not implemented IndexIgnore pattern ... B cvda £ ¢ £ NoCache * host domain ... ¤ E cv 305 Use proxy 502 Bad gateway ¢ IndexOrderDefault Ascending Descending £ Name Date B cvda 1.3 ¢ ¤ £ £ 400 Bad request 503 Service unavailable DefaultIcon url £ Size Description B cvda ¤ Common Gateway Interface (CGI) variables 401 Unauthorized 504 Gateway timeout AUTH_TYPE Authentication method used 402 Payment required 505 HTTP version not supported AddAlt string file ... B cvda CONTENT_LENGTH Length of input stream data 403 Forbidden AddAltByEncoding string MIME-encoding ... B cvda CONTENT_TYPE Internet media type of input stream AddAltByType string MIME-type ... B cvda GATEWAY_INTERFACE CGI version Apache Web Resources AddIcon icon file ... B cvda PATH_INFO URL part after script identifier http://www.apache.org Apache home page AddIconByType icon MIME-type ... B cvda PATH_TRANSLATED PATH_INFO translated into filesystem http://modules.apache.org Apache Module Registry AddIconByEncoding icon MIME-encoding ... B cvda QUERY_STRING Query string from URL (if present) AddDescription description file-pattern B cvda http://www.apache-ssl.org Apache-SSL home page REMOTE_ADDR IP address of client http://www.modssl.org mod ssl home page ¢ £ IndexOptions +option -option ... ¤ (no options) B cvda 1.3 REMOTE_HOST DNS name of client http://java.apache.org The Java-Apache Project Valid index options are: FancyIndexing , REMOTE_IDENT Remote user id (unreliable) http://perl.apache.org The Apache/Perl Integration Project IconsHeight=pixels, IconsWidth=pixels, REMOTE_USER Name of the authenticated user http://www.php.net PHP: Hypertext Processor NameWidth=n, IconsAreLinks , ScanHTMLTitles , REQUEST_METHOD HTTP request method http://www.apacheweek.com Apache Week SupressColumnSorting , SupressDescription , SCRIPT_NAME Virtual path of the script http://www.netcraft.com/survey Netcraft Server Survey SupressHTMLPreamble , SupressLastModified , SupressSize SERVER_NAME Host-name of the server http://www.refcards.com Quick Reference Cards SERVER_PORT Port number of server Access control directives SERVER_PROTOCOL Name and version of the protocol AccessFileName filename ... (.htaccess ) C cv 1.3 SERVER_SOFTWARE Server software name and version AllowOverride directive-group ... (All) C d HTTP_ACCEPT MIME types the browser will accept Valid directive groups are: None, All, AuthConfig , FileInfo, HTTP_REFERER URL of referring document 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: feedback@refcards.com £ ¢ 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

×