.htaccessで使用可能な指令一覧

Apache HTTP Serverの設定は,httpd.confと.htaccessにより行う。httpd.confは全体の設定であり,.htaccessはディレクトリー単位での設定となる。

以下に記載がある通り,公式文書ではパフォーマンスが低下することを理由に,.htaccessを非推奨としている。代わりに,httpd.confのDirectory指令内での設定を推奨している。

You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apache http server. Any directive that you can include in a .htaccess file is better set in a Directory block, as it will have the same effect with better performance.
Apache HTTP Server Tutorial: .htaccess files – Apache HTTP Server Version 2.4

しかし,レンタルサーバーなどApacheの全体設定であるhttpd.confを編集できない場合,.htaccessにより設定をカスタマイズするしかない

その場合に問題となるのが,.htaccessで使用可能な指令は何かだ。.htaccessとhttpd.confでは使用可能な指令に違いがある。公式文書では,以下の記載の通り,ドキュメントのdirectiveのcontext欄を見るように指示がある。

If you are unsure whether a particular directive is permitted in a .htaccess file, look at the documentation for that directive, and check the Context line for “.htaccess”.
Apache HTTP Server Tutorial: .htaccess files – Apache HTTP Server Version 2.4

しかし,.htaccessしか使えないのだから,.htaccessで使用可能な指令の一覧がほしい。探したところ,公式文書やネット上にはそのようなリストは存在しなかった

しかたがないので自分で作ることにした。以下のコマンドでApache HTTP Server 2.4の文書ページから,モジュールごとのページを取得し,その中から.htaccessで使用可能な指令をHTMLの表形式で出力する。

.htaccessで使用可能な指令一覧を作成するget-htacces-dir.sh
:
## \file get-htaccess-dir.sh
## \copyright CC0
## \brief Apache HTTP Serverのドキュメントから,htaccessで使用可能な指令 (Directive) 一覧を取得し,HTMLの表形式で出力する。
## \warn SyntaxやDefaultも取得しているが,HTMLの記述が複数行にまたがっていてきちんと取得できていない。あくまで参考にする。

## プログラムの作成方針
## 0. GNU wgetにより現在ディレクトリーにページを取得。
## 1. 1行格納。
## 2. Directiveがあれば一時保存。
## 3. .htaccessがあれば正式保存。
## 4. .htaccessがなく、ファイル終端か、次のDirectiveに来たら無視。

set -eu
wget -nc -nd -r -np -A html http://httpd.apache.org/docs/2.4/mod/ || :

HT=$(printf '\t') LF=$(printf '\n.') LF="${LF%.}"
save="Module${HT}Directive${HT}Default${HT}Override${HT}Syntax${HT}Description"
htaccess=false

for html in *.html; do
  htaccess=false dir= desc= syntax= or= mod= def=
  while read -r line; do
    case "$line" in
      *'<table'*)         htaccess=false;;
      *'>Directive<'*)    line="${line%%</a>*}" dir="${line##*>}";;
      *'>Description:<'*) line="${line##*<t[hd]>}" desc="${line%%</t[hd]>*}";;
      *'>Syntax:<'*)      line="${line##*<t[hd]>}" syntax="${line%%</t[hd]>*}";;
      *'>Override:<'*)    line="${line##*<t[hd]>}" or="${line%%</t[hd]>*}";;
      *'>Module:<'*)      line="${line##*<t[hd]>}" mod="${line%%</t[hd]>*}";;
      *'>Default:<'*)     line="${line##*<t[hd]>}" def="${line%%</t[hd]>*}";;
      *'.htaccess'*)      htaccess=true;;
      *'</table>'*)
        $htaccess && save="$save$LF$mod$HT$dir$HT$def$HT$or$HT$syntax$HT$desc"
        htaccess=false dir= desc= syntax= or= mod= def=;;
    esac
  done <"$html"
done

echo "$save" | sed -e "1i<table>\n<thead>" -e "2i</thead>\n<tbody>" \
  -e "s@^@<tr><td>@; s@$HT@</td><td>@g; s@\$@</td></tr>@" \
  -e '$a</tbody>\n</table>'

Apache HTTP Server v2.4.39での出力結果を以下の表に記す。thead内のtd要素をth要素に変更し,末尾の空行2行を削除した。

なお,一覧作成に当たって,参考情報として,DefaultやSyntaxも出力している。しかし,内容が複数行にまたがっていために,うまく取得できていない。これをうまく処理しようとするとたいへんであり,元々の目的である指令一覧は取得できているので,あくまで参考とする。

全モジュールからリストアップしているため,数が276個と多くなった。よく使うcoreなどの指令だけ把握しておけばよいだろう。例えば,Directoryなどの指令が.htaccessでは使えないことがこれで分かる。

この表を元に,レンタルサーバーなどで.htaccessの設定を行っていきたい。

.htaccessで使用可能な指令一覧 (httpd v2.4.39)
ModuleDirectiveDefaultOverrideSyntaxDescription
coreAcceptPathInfoAcceptPathInfo DefaultFileInfoAcceptPathInfo On|Off|DefaultResources accept trailing pathname information
coreAddDefaultCharsetAddDefaultCharset OffFileInfoAddDefaultCharset On|Off|charsetDefault charset parameter to be added when a response
coreAllowOverrideAllowOverride None (2.3.9 and later), AllowOverride All (2.3.8 and earlier)
AllowOverride All|None|directive-typeTypes of directives that are allowed in
coreAllowOverrideListAllowOverrideList None
AllowOverrideList None|directiveIndividual directives that are allowed in
coreCGIMapExtension
FileInfoCGIMapExtension cgi-path .extensionTechnique for locating the interpreter for CGI
coreCGIPassAuthCGIPassAuth OffAuthConfigCGIPassAuth On|OffEnables passing HTTP authorization headers to scripts as CGI
coreCGIVar
FileInfoCGIVar variable ruleControls how some CGI variables are set
coreContentDigestContentDigest OffOptionsContentDigest On|OffEnables the generation of Content-MD5 HTTP Response
coreDefaultTypeDefaultType noneFileInfoDefaultType media-type|noneThis directive has no effect other than to emit warnings
core<Else>
All<Else> ... </Else>Contains directives that apply only if the condition of a
core<ElseIf>
All<ElseIf expression> ... </ElseIf>Contains directives that apply only if a condition is satisfied
coreEnableMMAPEnableMMAP OnFileInfoEnableMMAP On|OffUse memory-mapping to read files during delivery
coreEnableSendfileEnableSendfile OffFileInfoEnableSendfile On|OffUse the kernel sendfile support to deliver files to the client
coreError

Error messageAbort configuration parsing with a custom error message
coreErrorDocument
FileInfoErrorDocument error-code documentWhat the server will return to the client
coreFileETagFileETag MTime SizeFileInfoFileETag component ...File attributes used to create the ETag
core<Files>
All<Files filename> ... </Files>Contains directives that apply to matched
core<FilesMatch>
All<FilesMatch regex> ... </FilesMatch>Contains directives that apply to regular-expression matched
coreForceType
FileInfoForceType media-type|NoneForces all matching files to be served with the specified
core<If>
All<If expression> ... </If>Contains directives that apply only if a condition is
core<IfDefine>
All<IfDefine [!]parameter-name> ...Encloses directives that will be processed only
core<IfDirective>
All<IfDirective [!]directive-name> ...Encloses directives that are processed conditional on the
core<IfFile>
All<IfFile [!]filename> ...Encloses directives that will be processed only
core<IfModule>
All<IfModule [!]module-file|module-identifier> ...Encloses directives that are processed conditional on the
core<IfSection>
All<IfSection [!]section-name> ...Encloses directives that are processed conditional on the
core<Limit>
AuthConfig, Limit<Limit method [method] ... > ...Restrict enclosed access controls to only certain HTTP
core<LimitExcept>
AuthConfig, Limit<LimitExcept method [method] ... > ...Restrict access controls to all HTTP methods
coreLimitRequestBodyLimitRequestBody 0AllLimitRequestBody bytesRestricts the total size of the HTTP request body sent
coreLimitXMLRequestBodyLimitXMLRequestBody 1000000AllLimitXMLRequestBody bytesLimits the size of an XML-based request body
coreOptionsOptions FollowSymlinksOptionsOptionsConfigures what features are available in a particular
coreRLimitCPUUnset; uses operating system defaultsAllRLimitCPU seconds|max [seconds|max]Limits the CPU consumption of processes launched
coreRLimitMEMUnset; uses operating system defaultsAllRLimitMEM bytes|max [bytes|max]Limits the memory consumption of processes launched
coreRLimitNPROCUnset; uses operating system defaultsAllRLimitNPROC number|max [number|max]Limits the number of processes that can be launched by
coreScriptInterpreterSourceScriptInterpreterSource ScriptFileInfoScriptInterpreterSource Registry|Registry-Strict|ScriptTechnique for locating the interpreter for CGI
coreServerSignatureServerSignature OffAllServerSignature On|Off|EMailConfigures the footer on server-generated documents
coreSetHandler
FileInfoSetHandler handler-name|none|expressionForces all matching files to be processed by a
coreSetInputFilter
FileInfoSetInputFilter filter[;filter...]Sets the filters that will process client requests and POST
coreSetOutputFilter
FileInfoSetOutputFilter filter[;filter...]Sets the filters that will process responses from the
mod_access_compatAllow
Limit Allow from all|host|env=[!]env-variableControls which hosts can access an area of the
mod_access_compatDeny
Limit Deny from all|host|env=[!]env-variableControls which hosts are denied access to the
mod_access_compatOrderOrder Deny,AllowLimit Order orderingControls the default access state and the order in which
mod_access_compatSatisfySatisfy AllAuthConfigSatisfy Any|AllInteraction between host-level access control and
mod_actionsAction
FileInfoAction action-type cgi-script [virtual]Activates a CGI script for a particular handler or
mod_aliasRedirect
FileInfoRedirect [status] [URL-path]Sends an external redirect asking the client to fetch
mod_aliasRedirectMatch
FileInfoRedirectMatch [status] regexSends an external redirect based on a regular expression match
mod_aliasRedirectPermanent
FileInfoRedirectPermanent URL-path URLSends an external permanent redirect asking the client to fetch
mod_aliasRedirectTemp
FileInfoRedirectTemp URL-path URLSends an external temporary redirect asking the client to fetch
mod_auth_basicAuthBasicAuthoritativeAuthBasicAuthoritative OnAuthConfigAuthBasicAuthoritative On|OffSets whether authorization and authentication are passed to
mod_auth_basicAuthBasicFakenoneAuthConfigAuthBasicFake off|username [password]Fake basic authentication using the given expressions for
mod_auth_basicAuthBasicProviderAuthBasicProvider fileAuthConfigAuthBasicProvider provider-nameSets the authentication provider(s) for this location
mod_auth_basicAuthBasicUseDigestAlgorithmAuthBasicUseDigestAlgorithm OffAuthConfigAuthBasicUseDigestAlgorithm MD5|OffCheck passwords against the authentication providers as if
mod_auth_digestAuthDigestAlgorithmAuthDigestAlgorithm MD5AuthConfigAuthDigestAlgorithm MD5|MD5-sessSelects the algorithm used to calculate the challenge and
mod_auth_digestAuthDigestDomain
AuthConfigAuthDigestDomain URI [URI] ...URIs that are in the same protection space for digest
mod_auth_digestAuthDigestNonceLifetimeAuthDigestNonceLifetime 300AuthConfigAuthDigestNonceLifetime secondsHow long the server nonce is valid
mod_auth_digestAuthDigestProviderAuthDigestProvider fileAuthConfigAuthDigestProvider provider-nameSets the authentication provider(s) for this location
mod_auth_digestAuthDigestQopAuthDigestQop authAuthConfigAuthDigestQop none|auth|auth-int [auth|auth-int]Determines the quality-of-protection to use in digest
mod_auth_formAuthFormAuthoritativeAuthFormAuthoritative OnAuthConfigAuthFormAuthoritative On|OffSets whether authorization and authentication are passed to
mod_auth_formAuthFormProviderAuthFormProvider fileAuthConfigAuthFormProvider provider-nameSets the authentication provider(s) for this location
mod_authn_anonAnonymous
AuthConfigAnonymous user [user] ...Specifies userIDs that are allowed access without
mod_authn_anonAnonymous_LogEmailAnonymous_LogEmail OnAuthConfigAnonymous_LogEmail On|OffSets whether the password entered will be logged in the
mod_authn_anonAnonymous_MustGiveEmailAnonymous_MustGiveEmail OnAuthConfigAnonymous_MustGiveEmail On|OffSpecifies whether blank passwords are allowed
mod_authn_anonAnonymous_NoUserIDAnonymous_NoUserID OffAuthConfigAnonymous_NoUserID On|OffSets whether the userID field may be empty
mod_authn_anonAnonymous_VerifyEmailAnonymous_VerifyEmail OffAuthConfigAnonymous_VerifyEmail On|OffSets whether to check the password field for a correctly
mod_authn_coreAuthName
AuthConfigAuthName auth-domainAuthorization realm for use in HTTP
mod_authn_coreAuthType
AuthConfigAuthType None|Basic|Digest|FormType of user authentication
mod_authn_dbmAuthDBMTypeAuthDBMType defaultAuthConfigAuthDBMType default|SDBM|GDBM|NDBM|DBSets the type of database file that is used to
mod_authn_dbmAuthDBMUserFile
AuthConfigAuthDBMUserFile file-pathSets the name of a database file containing the list of users and
mod_authn_fileAuthUserFile
AuthConfigAuthUserFile file-pathSets the name of a text file containing the list of users and
mod_authn_socacheAuthnCacheProvideForNoneAuthConfigAuthnCacheProvideFor authn-provider [...]Specify which authn provider(s) to cache for
mod_authn_socacheAuthnCacheTimeout300 (5 minutes)AuthConfigAuthnCacheTimeout timeout (seconds)Set a timeout for cache entries
mod_authnz_ldapAuthLDAPAuthorizePrefixAuthLDAPAuthorizePrefix AUTHORIZE_AuthConfigAuthLDAPAuthorizePrefix prefixSpecifies the prefix for environment variables set during
mod_authnz_ldapAuthLDAPBindAuthoritativeAuthLDAPBindAuthoritative onAuthConfigAuthLDAPBindAuthoritative off|onDetermines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user’s credentials.
mod_authnz_ldapAuthLDAPBindDN
AuthConfigAuthLDAPBindDN distinguished-nameOptional DN to use in binding to the LDAP server
mod_authnz_ldapAuthLDAPBindPassword
AuthConfigAuthLDAPBindPassword passwordPassword used in conjunction with the bind DN
mod_authnz_ldapAuthLDAPCompareAsUserAuthLDAPCompareAsUser offAuthConfigAuthLDAPCompareAsUser on|offUse the authenticated user’s credentials to perform authorization comparisons
mod_authnz_ldapAuthLDAPCompareDNOnServerAuthLDAPCompareDNOnServer onAuthConfigAuthLDAPCompareDNOnServer on|offUse the LDAP server to compare the DNs
mod_authnz_ldapAuthLDAPDereferenceAliasesAuthLDAPDereferenceAliases alwaysAuthConfigAuthLDAPDereferenceAliases never|searching|finding|alwaysWhen will the module de-reference aliases
mod_authnz_ldapAuthLDAPGroupAttributeAuthLDAPGroupAttribute member uniqueMemberAuthConfigAuthLDAPGroupAttribute attributeLDAP attributes used to identify the user members of
mod_authnz_ldapAuthLDAPGroupAttributeIsDNAuthLDAPGroupAttributeIsDN onAuthConfigAuthLDAPGroupAttributeIsDN on|offUse the DN of the client username when checking for
mod_authnz_ldapAuthLDAPInitialBindAsUserAuthLDAPInitialBindAsUser offAuthConfigAuthLDAPInitialBindAsUser off|onDetermines if the server does the initial DN lookup using the basic authentication users’
mod_authnz_ldapAuthLDAPInitialBindPatternAuthLDAPInitialBindPattern (.*) $1 (remote username used verbatim)AuthConfigAuthLDAPInitialBindPattern regex substitutionSpecifies the transformation of the basic authentication username to be used when binding to the LDAP server
mod_authnz_ldapAuthLDAPMaxSubGroupDepthAuthLDAPMaxSubGroupDepth 10AuthConfigAuthLDAPMaxSubGroupDepth NumberSpecifies the maximum sub-group nesting depth that will be
mod_authnz_ldapAuthLDAPRemoteUserAttributenoneAuthConfigAuthLDAPRemoteUserAttribute uidUse the value of the attribute returned during the user
mod_authnz_ldapAuthLDAPRemoteUserIsDNAuthLDAPRemoteUserIsDN offAuthConfigAuthLDAPRemoteUserIsDN on|offUse the DN of the client username to set the REMOTE_USER
mod_authnz_ldapAuthLDAPSearchAsUserAuthLDAPSearchAsUser offAuthConfigAuthLDAPSearchAsUser on|offUse the authenticated user’s credentials to perform authorization searches
mod_authnz_ldapAuthLDAPSubGroupAttributeAuthLDAPSubGroupAttribute member uniqueMemberAuthConfigAuthLDAPSubGroupAttribute attributeSpecifies the attribute labels, one value per
mod_authnz_ldapAuthLDAPSubGroupClassAuthLDAPSubGroupClass groupOfNames groupOfUniqueNamesAuthConfigAuthLDAPSubGroupClass LdapObjectClassSpecifies which LDAP objectClass values identify directory
mod_authnz_ldapAuthLDAPURL
AuthConfigAuthLDAPURL url [NONE|SSL|TLS|STARTTLS]URL specifying the LDAP search parameters
mod_authz_coreAuthMergingAuthMerging OffAuthConfigAuthMerging Off | And | OrControls the manner in which each configuration section’s
mod_authz_coreAuthzSendForbiddenOnFailureAuthzSendForbiddenOnFailure Off
AuthzSendForbiddenOnFailure On|OffSend ‘403 FORBIDDEN’ instead of ‘401 UNAUTHORIZED’ if
mod_authz_coreRequire
AuthConfigRequire [not] entity-nameTests whether an authenticated user is authorized by
mod_authz_core<RequireAll>
AuthConfig<RequireAll> ... </RequireAll>Enclose a group of authorization directives of which none
mod_authz_core<RequireAny>
AuthConfig<RequireAny> ... </RequireAny>Enclose a group of authorization directives of which one
mod_authz_core<RequireNone>
AuthConfig<RequireNone> ... </RequireNone>Enclose a group of authorization directives of which none
mod_authz_dbmAuthDBMGroupFile
AuthConfigAuthDBMGroupFile file-pathSets the name of the database file containing the list
mod_authz_dbmAuthzDBMTypeAuthzDBMType defaultAuthConfigAuthzDBMType default|SDBM|GDBM|NDBM|DBSets the type of database file that is used to
mod_authz_groupfileAuthGroupFile
AuthConfigAuthGroupFile file-pathSets the name of a text file containing the list
mod_autoindexAddAlt
IndexesAddAlt string file [file] ...Alternate text to display for a file, instead of an
mod_autoindexAddAltByEncoding
IndexesAddAltByEncoding string MIME-encodingAlternate text to display for a file instead of an icon
mod_autoindexAddAltByType
IndexesAddAltByType string MIME-typeAlternate text to display for a file, instead of an
mod_autoindexAddDescription
IndexesAddDescription string file [file] ...Description to display for a file
mod_autoindexAddIcon
IndexesAddIcon icon name [name]Icon to display for a file selected by name
mod_autoindexAddIconByEncoding
IndexesAddIconByEncoding icon MIME-encodingIcon to display next to files selected by MIME
mod_autoindexAddIconByType
IndexesAddIconByType icon MIME-typeIcon to display next to files selected by MIME
mod_autoindexDefaultIcon
IndexesDefaultIcon url-pathIcon to display for files when no specific icon is
mod_autoindexHeaderName
IndexesHeaderName filenameName of the file that will be inserted at the top
mod_autoindexIndexHeadInsert
IndexesIndexHeadInsert "markup ..."Inserts text in the HEAD section of an index page.
mod_autoindexIndexIgnoreIndexIgnore "."IndexesIndexIgnore file [file] ...Adds to the list of files to hide when listing
mod_autoindexIndexIgnoreReset
IndexesIndexIgnoreReset ON|OFFEmpties the list of files to hide when listing
mod_autoindexIndexOptionsBy default, no options are enabled.IndexesIndexOptions [+|-]option [[+|-]option]Various configuration settings for directory
mod_autoindexIndexOrderDefaultIndexOrderDefault Ascending NameIndexesIndexOrderDefault Ascending|DescendingSets the default ordering of the directory index
mod_autoindexIndexStyleSheet
IndexesIndexStyleSheet url-pathAdds a CSS stylesheet to the directory index
mod_autoindexReadmeName
IndexesReadmeName filenameName of the file that will be inserted at the end
mod_bufferBufferSizeBufferSize 131072
BufferSize integerMaximum size in bytes to buffer by the buffer filter
mod_cacheCacheDefaultExpireCacheDefaultExpire 3600 (one hour)
CacheDefaultExpire secondsThe default duration to cache a document when no expiry date is specified.
mod_cacheCacheDetailHeaderCacheDetailHeader off
CacheDetailHeader on|offAdd an X-Cache-Detail header to the response.
mod_cacheCacheDisable

CacheDisable url-string | onDisable caching of specified URLs
mod_cacheCacheHeaderCacheHeader off
CacheHeader on|offAdd an X-Cache header to the response.
mod_cacheCacheIgnoreNoLastModCacheIgnoreNoLastMod Off
CacheIgnoreNoLastMod On|OffIgnore the fact that a response has no Last Modified
mod_cacheCacheLastModifiedFactorCacheLastModifiedFactor 0.1
CacheLastModifiedFactor floatThe factor used to compute an expiry date based on the
mod_cacheCacheMaxExpireCacheMaxExpire 86400 (one day)
CacheMaxExpire secondsThe maximum time in seconds to cache a document
mod_cacheCacheMinExpireCacheMinExpire 0
CacheMinExpire secondsThe minimum time in seconds to cache a document
mod_cacheCacheStaleOnErrorCacheStaleOnError on
CacheStaleOnError on|offServe stale content in place of 5xx responses.
mod_cacheCacheStoreExpiredCacheStoreExpired Off
CacheStoreExpired On|OffAttempt to cache responses that the server reports as expired
mod_cacheCacheStoreNoStoreCacheStoreNoStore Off
CacheStoreNoStore On|OffAttempt to cache requests or responses that have been marked as no-store.
mod_cacheCacheStorePrivateCacheStorePrivate Off
CacheStorePrivate On|OffAttempt to cache responses that the server has marked as private
mod_cache_diskCacheMaxFileSizeCacheMaxFileSize 1000000
CacheMaxFileSize bytesThe maximum size (in bytes) of a document to be placed in the
mod_cache_diskCacheMinFileSizeCacheMinFileSize 1
CacheMinFileSize bytesThe minimum size (in bytes) of a document to be placed in the
mod_cache_diskCacheReadSizeCacheReadSize 0
CacheReadSize bytesThe minimum size (in bytes) of the document to read and be cached
mod_cache_diskCacheReadTimeCacheReadTime 0
CacheReadTime millisecondsThe minimum time (in milliseconds) that should elapse while reading
mod_cache_socacheCacheSocacheMaxSizeCacheSocacheMaxSize 102400
CacheSocacheMaxSize bytesThe maximum size (in bytes) of an entry to be placed in the
mod_cache_socacheCacheSocacheMaxTimeCacheSocacheMaxTime 86400
CacheSocacheMaxTime secondsThe maximum time (in seconds) for a document to be placed in the
mod_cache_socacheCacheSocacheMinTimeCacheSocacheMinTime 600
CacheSocacheMinTime secondsThe minimum time (in seconds) for a document to be placed in the
mod_cache_socacheCacheSocacheReadSizeCacheSocacheReadSize 0
CacheSocacheReadSize bytesThe minimum size (in bytes) of the document to read and be cached
mod_cache_socacheCacheSocacheReadTimeCacheSocacheReadTime 0
CacheSocacheReadTime millisecondsThe minimum time (in milliseconds) that should elapse while reading
mod_cern_metaMetaDirMetaDir .webIndexesMetaDir directoryName of the directory to find CERN-style meta information
mod_cern_metaMetaFilesMetaFiles offIndexesMetaFiles on|offActivates CERN meta-file processing
mod_cern_metaMetaSuffixMetaSuffix .metaIndexesMetaSuffix suffixFile name suffix for the file containing CERN-style
mod_cgidCGIDScriptTimeoutvalue of Timeout directive when
CGIDScriptTimeout time[s|ms]The length of time to wait for more output from the
mod_charset_liteCharsetDefault
FileInfoCharsetDefault charsetCharset to translate into
mod_charset_liteCharsetOptionsCharsetOptions ImplicitAddFileInfoCharsetOptions option [option] ...Configures charset translation behavior
mod_charset_liteCharsetSourceEnc
FileInfoCharsetSourceEnc charsetSource charset of files
mod_deflateDeflateInflateLimitRequestBodyNone, but LimitRequestBody applies after deflation
DeflateInflateLimitRequestBody valueMaximum size of inflated request bodies
mod_deflateDeflateInflateRatioBurstDeflateInflateRatioBurst 3
DeflateInflateRatioBurst valueMaximum number of times the inflation ratio for request bodies
mod_deflateDeflateInflateRatioLimitDeflateInflateRatioLimit 200
DeflateInflateRatioLimit valueMaximum inflation ratio for request bodies
mod_dirDirectoryCheckHandlerDirectoryCheckHandler OffIndexesDirectoryCheckHandler On|OffToggle how this module responds when another handler is configured
mod_dirDirectoryIndexDirectoryIndex index.htmlIndexesDirectoryIndexList of resources to look for when the client requests
mod_dirDirectoryIndexRedirectDirectoryIndexRedirect offIndexesDirectoryIndexRedirect on | off | permanent | temp | seeother |Configures an external redirect for directory indexes.
mod_dirDirectorySlashDirectorySlash OnIndexesDirectorySlash On|OffToggle trailing slash redirects on or off
mod_dirFallbackResourcedisabled - httpd will return 404 (Not Found)IndexesFallbackResource disabled | local-urlDefine a default URL for requests that don’t map to a file
mod_envPassEnv
FileInfoPassEnv env-variable [env-variable]Passes environment variables from the shell
mod_envSetEnv
FileInfoSetEnv env-variable [value]Sets environment variables
mod_envUnsetEnv
FileInfoUnsetEnv env-variable [env-variable]Removes variables from the environment
mod_example_hooksExample

ExampleDemonstration directive to illustrate the Apache module
mod_expiresExpiresActiveExpiresActive OffIndexesExpiresActive On|OffEnables generation of Expires
mod_expiresExpiresByType
IndexesExpiresByType MIME-typeValue of the Expires header configured
mod_expiresExpiresDefault
IndexesExpiresDefault <code>secondsDefault algorithm for calculating expiration time
mod_filterAddOutputFilterByType
FileInfoAddOutputFilterByType filter[;filter...]assigns an output filter to a particular media-type
mod_filterFilterChain
OptionsFilterChain [+=-@!]filter-name ...Configure the filter chain
mod_filterFilterDeclare
OptionsFilterDeclare filter-name [type]Declare a smart filter
mod_filterFilterProtocol
OptionsFilterProtocol filter-name [provider-name]Deal with correct HTTP protocol handling
mod_filterFilterProvider
OptionsFilterProvider filter-name provider-nameRegister a content filter
mod_headersHeader
FileInfoHeader [condition] add|append|echo|edit|edit*|merge|set|setifempty|unset|noteConfigure HTTP response headers
mod_headersRequestHeader
FileInfoRequestHeader add|append|edit|edit*|merge|set|setifempty|unsetConfigure HTTP request headers
mod_http2H2CopyFilesH2CopyFiles off
H2CopyFiles on|offDetermine file handling in responses
mod_http2H2PushH2Push on
H2Push on|offH2 Server Push Switch
mod_http2H2PushResource

H2PushResource [add] path [critical]Declares resources for early pushing to the client
mod_http2H2UpgradeH2Upgrade on for h2c, off for h2 protocol
H2Upgrade on|offH2 Upgrade Protocol Switch
mod_imagemapImapBaseImapBase http://servername/IndexesImapBase map|referer|URLDefault base for imagemap files
mod_imagemapImapDefaultImapDefault nocontentIndexesImapDefault error|nocontent|map|referer|URLDefault action when an imagemap is called with coordinates
mod_imagemapImapMenuImapMenu formattedIndexesImapMenu none|formatted|semiformatted|unformattedAction if no coordinates are given when calling
mod_includeSSIErrorMsgSSIErrorMsg "[an error occurred while processing thisAllSSIErrorMsg messageError message displayed when there is an SSI
mod_includeSSIETagSSIETag off
SSIETag on|offControls whether ETags are generated by the server.
mod_includeSSILastModifiedSSILastModified off
SSILastModified on|offControls whether Last-Modified headers are generated by the
mod_includeSSILegacyExprParserSSILegacyExprParser off
SSILegacyExprParser on|offEnable compatibility mode for conditional expressions.
mod_includeSSITimeFormatSSITimeFormat "%A, %d-%b-%Y %H:%M:%S %Z"AllSSITimeFormat formatstringConfigures the format in which date strings are
mod_includeSSIUndefinedEchoSSIUndefinedEcho "(none)"AllSSIUndefinedEcho stringString displayed when an unset variable is echoed
mod_includeXBitHackXBitHack offOptionsXBitHack on|off|fullParse SSI directives in files with the execute bit
mod_isapiISAPIAppendLogToErrorsISAPIAppendLogToErrors offFileInfoISAPIAppendLogToErrors on|offRecord HSE_APPEND_LOG_PARAMETER requests from
mod_isapiISAPIAppendLogToQueryISAPIAppendLogToQuery onFileInfoISAPIAppendLogToQuery on|offRecord HSE_APPEND_LOG_PARAMETER requests from
mod_isapiISAPIFakeAsyncISAPIFakeAsync offFileInfoISAPIFakeAsync on|offFake asynchronous support for ISAPI callbacks
mod_isapiISAPILogNotSupportedISAPILogNotSupported offFileInfoISAPILogNotSupported on|offLog unsupported feature requests from ISAPI
mod_isapiISAPIReadAheadBufferISAPIReadAheadBuffer 49152FileInfoISAPIReadAheadBuffer sizeSize of the Read Ahead Buffer sent to ISAPI
mod_ldapLDAPReferralHopLimitSDK dependent, typically between 5 and 10AuthConfigLDAPReferralHopLimit numberThe maximum number of referral hops to chase before terminating an LDAP query.
mod_ldapLDAPReferralsLDAPReferrals OnAuthConfigLDAPReferrals On|Off|defaultEnable referral chasing during queries to the LDAP server.
mod_ldapLDAPTrustedClientCert

LDAPTrustedClientCert type directory-path/filename/nickname [password]Sets the file containing or nickname referring to a per
mod_logioLogIOTrackTTFBLogIOTrackTTFB OFFAllLogIOTrackTTFB ON|OFFEnable tracking of time to first byte (TTFB)
mod_luaLuaCodeCacheLuaCodeCache statAllLuaCodeCache stat|forever|neverConfigure the compiled code cache.
mod_luaLuaHookAccessChecker
AllLuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]Provide a hook for the access_checker phase of request processing
mod_luaLuaHookAuthChecker
AllLuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]Provide a hook for the auth_checker phase of request processing
mod_luaLuaHookCheckUserID
AllLuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]Provide a hook for the check_user_id phase of request processing
mod_luaLuaHookFixups
AllLuaHookFixups /path/to/lua/script.lua hook_function_nameProvide a hook for the fixups phase of a request
mod_luaLuaHookInsertFilter
AllLuaHookInsertFilter /path/to/lua/script.lua hook_function_nameProvide a hook for the insert_filter phase of request processing
mod_luaLuaHookLog
AllLuaHookLog /path/to/lua/script.lua log_function_nameProvide a hook for the access log phase of a request
mod_luaLuaHookMapToStorage
AllLuaHookMapToStorage /path/to/lua/script.lua hook_function_nameProvide a hook for the map_to_storage phase of request processing
mod_luaLuaHookTypeChecker
AllLuaHookTypeChecker /path/to/lua/script.lua hook_function_nameProvide a hook for the type_checker phase of request processing
mod_luaLuaInheritLuaInherit parent-firstAllLuaInherit none|parent-first|parent-lastControls how parent configuration sections are merged into children
mod_luaLuaMapHandler
AllLuaMapHandler uri-pattern /path/to/lua/script.lua [function-name]Map a path to a lua handler
mod_luaLuaPackageCPath
AllLuaPackageCPath /path/to/include/?.soaAdd a directory to lua’s package.cpath
mod_luaLuaPackagePath
AllLuaPackagePath /path/to/include/?.luaAdd a directory to lua’s package.path
mod_luaLuaRoot
AllLuaRoot /path/to/a/directorySpecify the base path for resolving relative paths for mod_lua directives
mod_luaLuaScopeLuaScope onceAllLuaScope once|request|conn|thread|server [min] [max]One of once, request, conn, thread — default is once
mod_mimeAddCharset
FileInfoAddCharset charset extensionMaps the given filename extensions to the specified content
mod_mimeAddEncoding
FileInfoAddEncoding encoding extensionMaps the given filename extensions to the specified encoding
mod_mimeAddHandler
FileInfoAddHandler handler-name extensionMaps the filename extensions to the specified
mod_mimeAddInputFilter
FileInfoAddInputFilter filter[;filter...]Maps filename extensions to the filters that will process
mod_mimeAddLanguage
FileInfoAddLanguage language-tag extensionMaps the given filename extension to the specified content
mod_mimeAddOutputFilter
FileInfoAddOutputFilter filter[;filter...]Maps filename extensions to the filters that will process
mod_mimeAddType
FileInfoAddType media-type extensionMaps the given filename extensions onto the specified content
mod_mimeDefaultLanguage
FileInfoDefaultLanguage language-tagDefines a default language-tag to be sent in the Content-Language
mod_mimeMultiviewsMatchMultiviewsMatch NegotiatedOnlyFileInfoMultiviewsMatch Any|NegotiatedOnly|Filters|HandlersThe types of files that will be included when searching for
mod_mimeRemoveCharset
FileInfoRemoveCharset extension [extension]Removes any character set associations for a set of file
mod_mimeRemoveEncoding
FileInfoRemoveEncoding extension [extension]Removes any content encoding associations for a set of file
mod_mimeRemoveHandler
FileInfoRemoveHandler extension [extension]Removes any handler associations for a set of file
mod_mimeRemoveInputFilter
FileInfoRemoveInputFilter extension [extension]Removes any input filter associations for a set of file
mod_mimeRemoveLanguage
FileInfoRemoveLanguage extension [extension]Removes any language associations for a set of file
mod_mimeRemoveOutputFilter
FileInfoRemoveOutputFilter extension [extension]Removes any output filter associations for a set of file
mod_mimeRemoveType
FileInfoRemoveType extension [extension]Removes any content type associations for a set of file
mod_negotiationForceLanguagePriorityForceLanguagePriority PreferFileInfoForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback]Action to take if a single acceptable document is not
mod_negotiationLanguagePriority
FileInfoLanguagePriority MIME-lang [MIME-lang]The precedence of language variants for cases where
mod_proxy_fcgiProxyFCGIBackendTypeProxyFCGIBackendType FPM
ProxyFCGIBackendType FPM|GENERICSpecify the type of backend FastCGI application
mod_proxy_fcgiProxyFCGISetEnvIf

ProxyFCGISetEnvIf conditional-expressionAllow variables sent to FastCGI servers to be fixed up
mod_reflectorReflectorHeader
OptionsReflectorHeader inputheader [outputheader]Reflect an input header to the output headers
mod_rewriteRewriteBaseNoneFileInfoRewriteBase URL-pathSets the base URL for per-directory rewrites
mod_rewriteRewriteCond
FileInfo RewriteCondDefines a condition under which rewriting will take place
mod_rewriteRewriteEngineRewriteEngine offFileInfoRewriteEngine on|offEnables or disables runtime rewriting engine
mod_rewriteRewriteOptions
FileInfoRewriteOptions OptionsSets some special options for the rewrite engine
mod_rewriteRewriteRule
FileInfoRewriteRuleDefines rules for the rewriting engine






mod_sedInputSed

InputSed sed-commandSed command to filter request data (typically POST data)
mod_sedOutputSed

OutputSed sed-commandSed command for filtering response content
mod_sessionSessionSession OffAuthConfigSession On|OffEnables a session for the current directory or location
mod_sessionSessionEnvSessionEnv OffAuthConfigSessionEnv On|OffControl whether the contents of the session are written to the
mod_sessionSessionExcludenone
SessionExclude pathDefine URL prefixes for which a session is ignored
mod_sessionSessionHeadernoneAuthConfigSessionHeader headerImport session updates from a given HTTP response header
mod_sessionSessionIncludeall URLsAuthConfigSessionInclude pathDefine URL prefixes for which a session is valid
mod_sessionSessionMaxAgeSessionMaxAge 0AuthConfigSessionMaxAge maxageDefine a maximum age in seconds for a session
mod_session_cookieSessionCookieNamenone
SessionCookieName name attributesName and attributes for the RFC2109 cookie storing the session
mod_session_cookieSessionCookieName2none
SessionCookieName2 name attributesName and attributes for the RFC2965 cookie storing the session
mod_session_cookieSessionCookieRemoveSessionCookieRemove Off
SessionCookieRemove On|OffControl for whether session cookies should be removed from incoming HTTP headers
mod_session_cryptoSessionCryptoCipheraes256
SessionCryptoCipher nameThe crypto cipher to be used to encrypt the session
mod_session_cryptoSessionCryptoPassphrasenone
SessionCryptoPassphrase secret [ secret ... ] The key used to encrypt the session
mod_session_dbdSessionDBDCookieNamenone
SessionDBDCookieName name attributesName and attributes for the RFC2109 cookie storing the session ID
mod_session_dbdSessionDBDCookieName2none
SessionDBDCookieName2 name attributesName and attributes for the RFC2965 cookie storing the session ID
mod_session_dbdSessionDBDCookieRemoveSessionDBDCookieRemove On
SessionDBDCookieRemove On|OffControl for whether session ID cookies should be removed from incoming HTTP headers
mod_session_dbdSessionDBDDeleteLabelSessionDBDDeleteLabel deletesession
SessionDBDDeleteLabel labelThe SQL query to use to remove sessions from the database
mod_session_dbdSessionDBDInsertLabelSessionDBDInsertLabel insertsession
SessionDBDInsertLabel labelThe SQL query to use to insert sessions into the database
mod_session_dbdSessionDBDPerUserSessionDBDPerUser Off
SessionDBDPerUser On|OffEnable a per user session
mod_session_dbdSessionDBDSelectLabelSessionDBDSelectLabel selectsession
SessionDBDSelectLabel labelThe SQL query to use to select sessions from the database
mod_session_dbdSessionDBDUpdateLabelSessionDBDUpdateLabel updatesession
SessionDBDUpdateLabel labelThe SQL query to use to update existing sessions in the database
mod_setenvifBrowserMatch
FileInfoBrowserMatch regex [!]env-variable[=value]Sets environment variables conditional on HTTP User-Agent
mod_setenvifBrowserMatchNoCase
FileInfoBrowserMatchNoCase regex [!]env-variable[=value]Sets environment variables conditional on User-Agent without
mod_setenvifSetEnvIf
FileInfoSetEnvIf attributeSets environment variables based on attributes of the request
mod_setenvifSetEnvIfExpr
FileInfoSetEnvIfExpr exprSets environment variables based on an ap_expr expression
mod_setenvifSetEnvIfNoCase
FileInfoSetEnvIfNoCase attribute regexSets environment variables based on attributes of the request
mod_spelingCheckCaseOnlyCheckCaseOnly OffOptionsCheckCaseOnly on|offLimits the action of the speling module to case corrections
mod_spelingCheckSpellingCheckSpelling OffOptionsCheckSpelling on|offEnables the spelling
mod_sslSSLCipherSuiteSSLCipherSuite DEFAULT (depends on OpenSSL version)AuthConfigSSLCipherSuite [protocol] cipher-specCipher Suite available for negotiation in SSL
mod_sslSSLOptions
OptionsSSLOptions [+|-]option ...Configure various SSL engine run-time options
mod_sslSSLRenegBufferSizeSSLRenegBufferSize 131072AuthConfigSSLRenegBufferSize bytesSet the size for the SSL renegotiation buffer
mod_sslSSLRequire
AuthConfigSSLRequire expressionAllow access only when an arbitrarily complex
mod_sslSSLRequireSSL
AuthConfigSSLRequireSSLDeny access when SSL is not used for the
mod_sslSSLUserName
AuthConfigSSLUserName varnameVariable name to determine user name
mod_sslSSLVerifyClientSSLVerifyClient noneAuthConfigSSLVerifyClient levelType of Client Certificate verification
mod_sslSSLVerifyDepthSSLVerifyDepth 1AuthConfigSSLVerifyDepth numberMaximum depth of CA Certificates in Client
mod_substituteSubstitute
FileInfoSubstitute s/pattern/substitution/[infq]Pattern to filter the response content
mod_substituteSubstituteInheritBeforeSubstituteInheritBefore offFileInfoSubstituteInheritBefore on|offChange the merge order of inherited patterns
mod_substituteSubstituteMaxLineLengthSubstituteMaxLineLength 1mFileInfoSubstituteMaxLineLength bytes(b|B|k|K|m|M|g|G)Set the maximum line size
mod_usertrackCookieDomain
FileInfoCookieDomain domainThe domain to which the tracking cookie applies
mod_usertrackCookieExpires
FileInfoCookieExpires expiry-periodExpiry time for the tracking cookie
mod_usertrackCookieNameCookieName ApacheFileInfoCookieName tokenName of the tracking cookie
mod_usertrackCookieStyleCookieStyle NetscapeFileInfoCookieStyleFormat of the cookie header field
mod_usertrackCookieTrackingCookieTracking offFileInfoCookieTracking on|offEnables tracking cookie
mod_version<IfVersion>
All<IfVersion [[!]operator] version> ...contains version dependent configuration
mod_xml2encxml2EncDefault

xml2EncDefault nameSets a default encoding to assume when absolutely no information
mod_xml2encxml2StartParse

xml2StartParse element [element ...]Advise the parser to skip leading junk.

.htaccessで使用可能な指令一覧” に対して1件のコメントがあります。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です