.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の全体設定である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”.
しかし,.htaccessしか使えないのだから,.htaccessで使用可能な指令の一覧がほしい。探したところ,公式文書やネット上にはそのようなリストは存在しなかった。
しかたがないので自分で作ることにした。以下のコマンドでApache HTTP Server 2.4の文書ページから,モジュールごとのページを取得し,その中から.htaccessで使用可能な指令をHTMLの表形式で出力する。
:
## \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の設定を行っていきたい。
Module | Directive | Default | Override | Syntax | Description |
---|---|---|---|---|---|
core | AcceptPathInfo | AcceptPathInfo Default | FileInfo | AcceptPathInfo On|Off|Default | Resources accept trailing pathname information |
core | AddDefaultCharset | AddDefaultCharset Off | FileInfo | AddDefaultCharset On|Off|charset | Default charset parameter to be added when a response |
core | AllowOverride | AllowOverride None (2.3.9 and later), AllowOverride All (2.3.8 and earlier) | AllowOverride All|None|directive-type | Types of directives that are allowed in | |
core | AllowOverrideList | AllowOverrideList None | AllowOverrideList None|directive | Individual directives that are allowed in | |
core | CGIMapExtension | FileInfo | CGIMapExtension cgi-path .extension | Technique for locating the interpreter for CGI | |
core | CGIPassAuth | CGIPassAuth Off | AuthConfig | CGIPassAuth On|Off | Enables passing HTTP authorization headers to scripts as CGI |
core | CGIVar | FileInfo | CGIVar variable rule | Controls how some CGI variables are set | |
core | ContentDigest | ContentDigest Off | Options | ContentDigest On|Off | Enables the generation of Content-MD5 HTTP Response |
core | DefaultType | DefaultType none | FileInfo | DefaultType media-type|none | This 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 | |
core | EnableMMAP | EnableMMAP On | FileInfo | EnableMMAP On|Off | Use memory-mapping to read files during delivery |
core | EnableSendfile | EnableSendfile Off | FileInfo | EnableSendfile On|Off | Use the kernel sendfile support to deliver files to the client |
core | Error | Error message | Abort configuration parsing with a custom error message | ||
core | ErrorDocument | FileInfo | ErrorDocument error-code document | What the server will return to the client | |
core | FileETag | FileETag MTime Size | FileInfo | FileETag 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 | |
core | ForceType | FileInfo | ForceType media-type|None | Forces 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 | |
core | LimitRequestBody | LimitRequestBody 0 | All | LimitRequestBody bytes | Restricts the total size of the HTTP request body sent |
core | LimitXMLRequestBody | LimitXMLRequestBody 1000000 | All | LimitXMLRequestBody bytes | Limits the size of an XML-based request body |
core | Options | Options FollowSymlinks | Options | Options | Configures what features are available in a particular |
core | RLimitCPU | Unset; uses operating system defaults | All | RLimitCPU seconds|max [seconds|max] | Limits the CPU consumption of processes launched |
core | RLimitMEM | Unset; uses operating system defaults | All | RLimitMEM bytes|max [bytes|max] | Limits the memory consumption of processes launched |
core | RLimitNPROC | Unset; uses operating system defaults | All | RLimitNPROC number|max [number|max] | Limits the number of processes that can be launched by |
core | ScriptInterpreterSource | ScriptInterpreterSource Script | FileInfo | ScriptInterpreterSource Registry|Registry-Strict|Script | Technique for locating the interpreter for CGI |
core | ServerSignature | ServerSignature Off | All | ServerSignature On|Off|EMail | Configures the footer on server-generated documents |
core | SetHandler | FileInfo | SetHandler handler-name|none|expression | Forces all matching files to be processed by a | |
core | SetInputFilter | FileInfo | SetInputFilter filter[;filter...] | Sets the filters that will process client requests and POST | |
core | SetOutputFilter | FileInfo | SetOutputFilter filter[;filter...] | Sets the filters that will process responses from the | |
mod_access_compat | Allow | Limit | Allow from all|host|env=[!]env-variable | Controls which hosts can access an area of the | |
mod_access_compat | Deny | Limit | Deny from all|host|env=[!]env-variable | Controls which hosts are denied access to the | |
mod_access_compat | Order | Order Deny,Allow | Limit | Order ordering | Controls the default access state and the order in which |
mod_access_compat | Satisfy | Satisfy All | AuthConfig | Satisfy Any|All | Interaction between host-level access control and |
mod_actions | Action | FileInfo | Action action-type cgi-script [virtual] | Activates a CGI script for a particular handler or | |
mod_alias | Redirect | FileInfo | Redirect [status] [URL-path] | Sends an external redirect asking the client to fetch | |
mod_alias | RedirectMatch | FileInfo | RedirectMatch [status] regex | Sends an external redirect based on a regular expression match | |
mod_alias | RedirectPermanent | FileInfo | RedirectPermanent URL-path URL | Sends an external permanent redirect asking the client to fetch | |
mod_alias | RedirectTemp | FileInfo | RedirectTemp URL-path URL | Sends an external temporary redirect asking the client to fetch | |
mod_auth_basic | AuthBasicAuthoritative | AuthBasicAuthoritative On | AuthConfig | AuthBasicAuthoritative On|Off | Sets whether authorization and authentication are passed to |
mod_auth_basic | AuthBasicFake | none | AuthConfig | AuthBasicFake off|username [password] | Fake basic authentication using the given expressions for |
mod_auth_basic | AuthBasicProvider | AuthBasicProvider file | AuthConfig | AuthBasicProvider provider-name | Sets the authentication provider(s) for this location |
mod_auth_basic | AuthBasicUseDigestAlgorithm | AuthBasicUseDigestAlgorithm Off | AuthConfig | AuthBasicUseDigestAlgorithm MD5|Off | Check passwords against the authentication providers as if |
mod_auth_digest | AuthDigestAlgorithm | AuthDigestAlgorithm MD5 | AuthConfig | AuthDigestAlgorithm MD5|MD5-sess | Selects the algorithm used to calculate the challenge and |
mod_auth_digest | AuthDigestDomain | AuthConfig | AuthDigestDomain URI [URI] ... | URIs that are in the same protection space for digest | |
mod_auth_digest | AuthDigestNonceLifetime | AuthDigestNonceLifetime 300 | AuthConfig | AuthDigestNonceLifetime seconds | How long the server nonce is valid |
mod_auth_digest | AuthDigestProvider | AuthDigestProvider file | AuthConfig | AuthDigestProvider provider-name | Sets the authentication provider(s) for this location |
mod_auth_digest | AuthDigestQop | AuthDigestQop auth | AuthConfig | AuthDigestQop none|auth|auth-int [auth|auth-int] | Determines the quality-of-protection to use in digest |
mod_auth_form | AuthFormAuthoritative | AuthFormAuthoritative On | AuthConfig | AuthFormAuthoritative On|Off | Sets whether authorization and authentication are passed to |
mod_auth_form | AuthFormProvider | AuthFormProvider file | AuthConfig | AuthFormProvider provider-name | Sets the authentication provider(s) for this location |
mod_authn_anon | Anonymous | AuthConfig | Anonymous user [user] ... | Specifies userIDs that are allowed access without | |
mod_authn_anon | Anonymous_LogEmail | Anonymous_LogEmail On | AuthConfig | Anonymous_LogEmail On|Off | Sets whether the password entered will be logged in the |
mod_authn_anon | Anonymous_MustGiveEmail | Anonymous_MustGiveEmail On | AuthConfig | Anonymous_MustGiveEmail On|Off | Specifies whether blank passwords are allowed |
mod_authn_anon | Anonymous_NoUserID | Anonymous_NoUserID Off | AuthConfig | Anonymous_NoUserID On|Off | Sets whether the userID field may be empty |
mod_authn_anon | Anonymous_VerifyEmail | Anonymous_VerifyEmail Off | AuthConfig | Anonymous_VerifyEmail On|Off | Sets whether to check the password field for a correctly |
mod_authn_core | AuthName | AuthConfig | AuthName auth-domain | Authorization realm for use in HTTP | |
mod_authn_core | AuthType | AuthConfig | AuthType None|Basic|Digest|Form | Type of user authentication | |
mod_authn_dbm | AuthDBMType | AuthDBMType default | AuthConfig | AuthDBMType default|SDBM|GDBM|NDBM|DB | Sets the type of database file that is used to |
mod_authn_dbm | AuthDBMUserFile | AuthConfig | AuthDBMUserFile file-path | Sets the name of a database file containing the list of users and | |
mod_authn_file | AuthUserFile | AuthConfig | AuthUserFile file-path | Sets the name of a text file containing the list of users and | |
mod_authn_socache | AuthnCacheProvideFor | None | AuthConfig | AuthnCacheProvideFor authn-provider [...] | Specify which authn provider(s) to cache for |
mod_authn_socache | AuthnCacheTimeout | 300 (5 minutes) | AuthConfig | AuthnCacheTimeout timeout (seconds) | Set a timeout for cache entries |
mod_authnz_ldap | AuthLDAPAuthorizePrefix | AuthLDAPAuthorizePrefix AUTHORIZE_ | AuthConfig | AuthLDAPAuthorizePrefix prefix | Specifies the prefix for environment variables set during |
mod_authnz_ldap | AuthLDAPBindAuthoritative | AuthLDAPBindAuthoritative on | AuthConfig | AuthLDAPBindAuthoritative off|on | Determines 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_ldap | AuthLDAPBindDN | AuthConfig | AuthLDAPBindDN distinguished-name | Optional DN to use in binding to the LDAP server | |
mod_authnz_ldap | AuthLDAPBindPassword | AuthConfig | AuthLDAPBindPassword password | Password used in conjunction with the bind DN | |
mod_authnz_ldap | AuthLDAPCompareAsUser | AuthLDAPCompareAsUser off | AuthConfig | AuthLDAPCompareAsUser on|off | Use the authenticated user’s credentials to perform authorization comparisons |
mod_authnz_ldap | AuthLDAPCompareDNOnServer | AuthLDAPCompareDNOnServer on | AuthConfig | AuthLDAPCompareDNOnServer on|off | Use the LDAP server to compare the DNs |
mod_authnz_ldap | AuthLDAPDereferenceAliases | AuthLDAPDereferenceAliases always | AuthConfig | AuthLDAPDereferenceAliases never|searching|finding|always | When will the module de-reference aliases |
mod_authnz_ldap | AuthLDAPGroupAttribute | AuthLDAPGroupAttribute member uniqueMember | AuthConfig | AuthLDAPGroupAttribute attribute | LDAP attributes used to identify the user members of |
mod_authnz_ldap | AuthLDAPGroupAttributeIsDN | AuthLDAPGroupAttributeIsDN on | AuthConfig | AuthLDAPGroupAttributeIsDN on|off | Use the DN of the client username when checking for |
mod_authnz_ldap | AuthLDAPInitialBindAsUser | AuthLDAPInitialBindAsUser off | AuthConfig | AuthLDAPInitialBindAsUser off|on | Determines if the server does the initial DN lookup using the basic authentication users’ |
mod_authnz_ldap | AuthLDAPInitialBindPattern | AuthLDAPInitialBindPattern (.*) $1 (remote username used verbatim) | AuthConfig | AuthLDAPInitialBindPattern regex substitution | Specifies the transformation of the basic authentication username to be used when binding to the LDAP server |
mod_authnz_ldap | AuthLDAPMaxSubGroupDepth | AuthLDAPMaxSubGroupDepth 10 | AuthConfig | AuthLDAPMaxSubGroupDepth Number | Specifies the maximum sub-group nesting depth that will be |
mod_authnz_ldap | AuthLDAPRemoteUserAttribute | none | AuthConfig | AuthLDAPRemoteUserAttribute uid | Use the value of the attribute returned during the user |
mod_authnz_ldap | AuthLDAPRemoteUserIsDN | AuthLDAPRemoteUserIsDN off | AuthConfig | AuthLDAPRemoteUserIsDN on|off | Use the DN of the client username to set the REMOTE_USER |
mod_authnz_ldap | AuthLDAPSearchAsUser | AuthLDAPSearchAsUser off | AuthConfig | AuthLDAPSearchAsUser on|off | Use the authenticated user’s credentials to perform authorization searches |
mod_authnz_ldap | AuthLDAPSubGroupAttribute | AuthLDAPSubGroupAttribute member uniqueMember | AuthConfig | AuthLDAPSubGroupAttribute attribute | Specifies the attribute labels, one value per |
mod_authnz_ldap | AuthLDAPSubGroupClass | AuthLDAPSubGroupClass groupOfNames groupOfUniqueNames | AuthConfig | AuthLDAPSubGroupClass LdapObjectClass | Specifies which LDAP objectClass values identify directory |
mod_authnz_ldap | AuthLDAPURL | AuthConfig | AuthLDAPURL url [NONE|SSL|TLS|STARTTLS] | URL specifying the LDAP search parameters | |
mod_authz_core | AuthMerging | AuthMerging Off | AuthConfig | AuthMerging Off | And | Or | Controls the manner in which each configuration section’s |
mod_authz_core | AuthzSendForbiddenOnFailure | AuthzSendForbiddenOnFailure Off | AuthzSendForbiddenOnFailure On|Off | Send ‘403 FORBIDDEN’ instead of ‘401 UNAUTHORIZED’ if | |
mod_authz_core | Require | AuthConfig | Require [not] entity-name | Tests 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_dbm | AuthDBMGroupFile | AuthConfig | AuthDBMGroupFile file-path | Sets the name of the database file containing the list | |
mod_authz_dbm | AuthzDBMType | AuthzDBMType default | AuthConfig | AuthzDBMType default|SDBM|GDBM|NDBM|DB | Sets the type of database file that is used to |
mod_authz_groupfile | AuthGroupFile | AuthConfig | AuthGroupFile file-path | Sets the name of a text file containing the list | |
mod_autoindex | AddAlt | Indexes | AddAlt string file [file] ... | Alternate text to display for a file, instead of an | |
mod_autoindex | AddAltByEncoding | Indexes | AddAltByEncoding string MIME-encoding | Alternate text to display for a file instead of an icon | |
mod_autoindex | AddAltByType | Indexes | AddAltByType string MIME-type | Alternate text to display for a file, instead of an | |
mod_autoindex | AddDescription | Indexes | AddDescription string file [file] ... | Description to display for a file | |
mod_autoindex | AddIcon | Indexes | AddIcon icon name [name] | Icon to display for a file selected by name | |
mod_autoindex | AddIconByEncoding | Indexes | AddIconByEncoding icon MIME-encoding | Icon to display next to files selected by MIME | |
mod_autoindex | AddIconByType | Indexes | AddIconByType icon MIME-type | Icon to display next to files selected by MIME | |
mod_autoindex | DefaultIcon | Indexes | DefaultIcon url-path | Icon to display for files when no specific icon is | |
mod_autoindex | HeaderName | Indexes | HeaderName filename | Name of the file that will be inserted at the top | |
mod_autoindex | IndexHeadInsert | Indexes | IndexHeadInsert "markup ..." | Inserts text in the HEAD section of an index page. | |
mod_autoindex | IndexIgnore | IndexIgnore "." | Indexes | IndexIgnore file [file] ... | Adds to the list of files to hide when listing |
mod_autoindex | IndexIgnoreReset | Indexes | IndexIgnoreReset ON|OFF | Empties the list of files to hide when listing | |
mod_autoindex | IndexOptions | By default, no options are enabled. | Indexes | IndexOptions [+|-]option [[+|-]option] | Various configuration settings for directory |
mod_autoindex | IndexOrderDefault | IndexOrderDefault Ascending Name | Indexes | IndexOrderDefault Ascending|Descending | Sets the default ordering of the directory index |
mod_autoindex | IndexStyleSheet | Indexes | IndexStyleSheet url-path | Adds a CSS stylesheet to the directory index | |
mod_autoindex | ReadmeName | Indexes | ReadmeName filename | Name of the file that will be inserted at the end | |
mod_buffer | BufferSize | BufferSize 131072 | BufferSize integer | Maximum size in bytes to buffer by the buffer filter | |
mod_cache | CacheDefaultExpire | CacheDefaultExpire 3600 (one hour) | CacheDefaultExpire seconds | The default duration to cache a document when no expiry date is specified. | |
mod_cache | CacheDetailHeader | CacheDetailHeader off | CacheDetailHeader on|off | Add an X-Cache-Detail header to the response. | |
mod_cache | CacheDisable | CacheDisable url-string | on | Disable caching of specified URLs | ||
mod_cache | CacheHeader | CacheHeader off | CacheHeader on|off | Add an X-Cache header to the response. | |
mod_cache | CacheIgnoreNoLastMod | CacheIgnoreNoLastMod Off | CacheIgnoreNoLastMod On|Off | Ignore the fact that a response has no Last Modified | |
mod_cache | CacheLastModifiedFactor | CacheLastModifiedFactor 0.1 | CacheLastModifiedFactor float | The factor used to compute an expiry date based on the | |
mod_cache | CacheMaxExpire | CacheMaxExpire 86400 (one day) | CacheMaxExpire seconds | The maximum time in seconds to cache a document | |
mod_cache | CacheMinExpire | CacheMinExpire 0 | CacheMinExpire seconds | The minimum time in seconds to cache a document | |
mod_cache | CacheStaleOnError | CacheStaleOnError on | CacheStaleOnError on|off | Serve stale content in place of 5xx responses. | |
mod_cache | CacheStoreExpired | CacheStoreExpired Off | CacheStoreExpired On|Off | Attempt to cache responses that the server reports as expired | |
mod_cache | CacheStoreNoStore | CacheStoreNoStore Off | CacheStoreNoStore On|Off | Attempt to cache requests or responses that have been marked as no-store. | |
mod_cache | CacheStorePrivate | CacheStorePrivate Off | CacheStorePrivate On|Off | Attempt to cache responses that the server has marked as private | |
mod_cache_disk | CacheMaxFileSize | CacheMaxFileSize 1000000 | CacheMaxFileSize bytes | The maximum size (in bytes) of a document to be placed in the | |
mod_cache_disk | CacheMinFileSize | CacheMinFileSize 1 | CacheMinFileSize bytes | The minimum size (in bytes) of a document to be placed in the | |
mod_cache_disk | CacheReadSize | CacheReadSize 0 | CacheReadSize bytes | The minimum size (in bytes) of the document to read and be cached | |
mod_cache_disk | CacheReadTime | CacheReadTime 0 | CacheReadTime milliseconds | The minimum time (in milliseconds) that should elapse while reading | |
mod_cache_socache | CacheSocacheMaxSize | CacheSocacheMaxSize 102400 | CacheSocacheMaxSize bytes | The maximum size (in bytes) of an entry to be placed in the | |
mod_cache_socache | CacheSocacheMaxTime | CacheSocacheMaxTime 86400 | CacheSocacheMaxTime seconds | The maximum time (in seconds) for a document to be placed in the | |
mod_cache_socache | CacheSocacheMinTime | CacheSocacheMinTime 600 | CacheSocacheMinTime seconds | The minimum time (in seconds) for a document to be placed in the | |
mod_cache_socache | CacheSocacheReadSize | CacheSocacheReadSize 0 | CacheSocacheReadSize bytes | The minimum size (in bytes) of the document to read and be cached | |
mod_cache_socache | CacheSocacheReadTime | CacheSocacheReadTime 0 | CacheSocacheReadTime milliseconds | The minimum time (in milliseconds) that should elapse while reading | |
mod_cern_meta | MetaDir | MetaDir .web | Indexes | MetaDir directory | Name of the directory to find CERN-style meta information |
mod_cern_meta | MetaFiles | MetaFiles off | Indexes | MetaFiles on|off | Activates CERN meta-file processing |
mod_cern_meta | MetaSuffix | MetaSuffix .meta | Indexes | MetaSuffix suffix | File name suffix for the file containing CERN-style |
mod_cgid | CGIDScriptTimeout | value of | CGIDScriptTimeout time[s|ms] | The length of time to wait for more output from the | |
mod_charset_lite | CharsetDefault | FileInfo | CharsetDefault charset | Charset to translate into | |
mod_charset_lite | CharsetOptions | CharsetOptions ImplicitAdd | FileInfo | CharsetOptions option [option] ... | Configures charset translation behavior |
mod_charset_lite | CharsetSourceEnc | FileInfo | CharsetSourceEnc charset | Source charset of files | |
mod_deflate | DeflateInflateLimitRequestBody | None, but LimitRequestBody applies after deflation | DeflateInflateLimitRequestBody value | Maximum size of inflated request bodies | |
mod_deflate | DeflateInflateRatioBurst | DeflateInflateRatioBurst 3 | DeflateInflateRatioBurst value | Maximum number of times the inflation ratio for request bodies | |
mod_deflate | DeflateInflateRatioLimit | DeflateInflateRatioLimit 200 | DeflateInflateRatioLimit value | Maximum inflation ratio for request bodies | |
mod_dir | DirectoryCheckHandler | DirectoryCheckHandler Off | Indexes | DirectoryCheckHandler On|Off | Toggle how this module responds when another handler is configured |
mod_dir | DirectoryIndex | DirectoryIndex index.html | Indexes | DirectoryIndex | List of resources to look for when the client requests |
mod_dir | DirectoryIndexRedirect | DirectoryIndexRedirect off | Indexes | DirectoryIndexRedirect on | off | permanent | temp | seeother | | Configures an external redirect for directory indexes. |
mod_dir | DirectorySlash | DirectorySlash On | Indexes | DirectorySlash On|Off | Toggle trailing slash redirects on or off |
mod_dir | FallbackResource | disabled - httpd will return 404 (Not Found) | Indexes | FallbackResource disabled | local-url | Define a default URL for requests that don’t map to a file |
mod_env | PassEnv | FileInfo | PassEnv env-variable [env-variable] | Passes environment variables from the shell | |
mod_env | SetEnv | FileInfo | SetEnv env-variable [value] | Sets environment variables | |
mod_env | UnsetEnv | FileInfo | UnsetEnv env-variable [env-variable] | Removes variables from the environment | |
mod_example_hooks | Example | Example | Demonstration directive to illustrate the Apache module | ||
mod_expires | ExpiresActive | ExpiresActive Off | Indexes | ExpiresActive On|Off | Enables generation of Expires |
mod_expires | ExpiresByType | Indexes | ExpiresByType MIME-type | Value of the Expires header configured | |
mod_expires | ExpiresDefault | Indexes | ExpiresDefault <code>seconds | Default algorithm for calculating expiration time | |
mod_filter | AddOutputFilterByType | FileInfo | AddOutputFilterByType filter[;filter...] | assigns an output filter to a particular media-type | |
mod_filter | FilterChain | Options | FilterChain [+=-@!]filter-name ... | Configure the filter chain | |
mod_filter | FilterDeclare | Options | FilterDeclare filter-name [type] | Declare a smart filter | |
mod_filter | FilterProtocol | Options | FilterProtocol filter-name [provider-name] | Deal with correct HTTP protocol handling | |
mod_filter | FilterProvider | Options | FilterProvider filter-name provider-name | Register a content filter | |
mod_headers | Header | FileInfo | Header [condition] add|append|echo|edit|edit*|merge|set|setifempty|unset|note | Configure HTTP response headers | |
mod_headers | RequestHeader | FileInfo | RequestHeader add|append|edit|edit*|merge|set|setifempty|unset | Configure HTTP request headers | |
mod_http2 | H2CopyFiles | H2CopyFiles off | H2CopyFiles on|off | Determine file handling in responses | |
mod_http2 | H2Push | H2Push on | H2Push on|off | H2 Server Push Switch | |
mod_http2 | H2PushResource | H2PushResource [add] path [critical] | Declares resources for early pushing to the client | ||
mod_http2 | H2Upgrade | H2Upgrade on for h2c, off for h2 protocol | H2Upgrade on|off | H2 Upgrade Protocol Switch | |
mod_imagemap | ImapBase | ImapBase http://servername/ | Indexes | ImapBase map|referer|URL | Default base for imagemap files |
mod_imagemap | ImapDefault | ImapDefault nocontent | Indexes | ImapDefault error|nocontent|map|referer|URL | Default action when an imagemap is called with coordinates |
mod_imagemap | ImapMenu | ImapMenu formatted | Indexes | ImapMenu none|formatted|semiformatted|unformatted | Action if no coordinates are given when calling |
mod_include | SSIErrorMsg | SSIErrorMsg "[an error occurred while processing this | All | SSIErrorMsg message | Error message displayed when there is an SSI |
mod_include | SSIETag | SSIETag off | SSIETag on|off | Controls whether ETags are generated by the server. | |
mod_include | SSILastModified | SSILastModified off | SSILastModified on|off | Controls whether Last-Modified headers are generated by the | |
mod_include | SSILegacyExprParser | SSILegacyExprParser off | SSILegacyExprParser on|off | Enable compatibility mode for conditional expressions. | |
mod_include | SSITimeFormat | SSITimeFormat "%A, %d-%b-%Y %H:%M:%S %Z" | All | SSITimeFormat formatstring | Configures the format in which date strings are |
mod_include | SSIUndefinedEcho | SSIUndefinedEcho "(none)" | All | SSIUndefinedEcho string | String displayed when an unset variable is echoed |
mod_include | XBitHack | XBitHack off | Options | XBitHack on|off|full | Parse SSI directives in files with the execute bit |
mod_isapi | ISAPIAppendLogToErrors | ISAPIAppendLogToErrors off | FileInfo | ISAPIAppendLogToErrors on|off | Record HSE_APPEND_LOG_PARAMETER requests from |
mod_isapi | ISAPIAppendLogToQuery | ISAPIAppendLogToQuery on | FileInfo | ISAPIAppendLogToQuery on|off | Record HSE_APPEND_LOG_PARAMETER requests from |
mod_isapi | ISAPIFakeAsync | ISAPIFakeAsync off | FileInfo | ISAPIFakeAsync on|off | Fake asynchronous support for ISAPI callbacks |
mod_isapi | ISAPILogNotSupported | ISAPILogNotSupported off | FileInfo | ISAPILogNotSupported on|off | Log unsupported feature requests from ISAPI |
mod_isapi | ISAPIReadAheadBuffer | ISAPIReadAheadBuffer 49152 | FileInfo | ISAPIReadAheadBuffer size | Size of the Read Ahead Buffer sent to ISAPI |
mod_ldap | LDAPReferralHopLimit | SDK dependent, typically between 5 and 10 | AuthConfig | LDAPReferralHopLimit number | The maximum number of referral hops to chase before terminating an LDAP query. |
mod_ldap | LDAPReferrals | LDAPReferrals On | AuthConfig | LDAPReferrals On|Off|default | Enable referral chasing during queries to the LDAP server. |
mod_ldap | LDAPTrustedClientCert | LDAPTrustedClientCert type directory-path/filename/nickname [password] | Sets the file containing or nickname referring to a per | ||
mod_logio | LogIOTrackTTFB | LogIOTrackTTFB OFF | All | LogIOTrackTTFB ON|OFF | Enable tracking of time to first byte (TTFB) |
mod_lua | LuaCodeCache | LuaCodeCache stat | All | LuaCodeCache stat|forever|never | Configure the compiled code cache. |
mod_lua | LuaHookAccessChecker | All | LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late] | Provide a hook for the access_checker phase of request processing | |
mod_lua | LuaHookAuthChecker | All | LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late] | Provide a hook for the auth_checker phase of request processing | |
mod_lua | LuaHookCheckUserID | All | LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late] | Provide a hook for the check_user_id phase of request processing | |
mod_lua | LuaHookFixups | All | LuaHookFixups /path/to/lua/script.lua hook_function_name | Provide a hook for the fixups phase of a request | |
mod_lua | LuaHookInsertFilter | All | LuaHookInsertFilter /path/to/lua/script.lua hook_function_name | Provide a hook for the insert_filter phase of request processing | |
mod_lua | LuaHookLog | All | LuaHookLog /path/to/lua/script.lua log_function_name | Provide a hook for the access log phase of a request | |
mod_lua | LuaHookMapToStorage | All | LuaHookMapToStorage /path/to/lua/script.lua hook_function_name | Provide a hook for the map_to_storage phase of request processing | |
mod_lua | LuaHookTypeChecker | All | LuaHookTypeChecker /path/to/lua/script.lua hook_function_name | Provide a hook for the type_checker phase of request processing | |
mod_lua | LuaInherit | LuaInherit parent-first | All | LuaInherit none|parent-first|parent-last | Controls how parent configuration sections are merged into children |
mod_lua | LuaMapHandler | All | LuaMapHandler uri-pattern /path/to/lua/script.lua [function-name] | Map a path to a lua handler | |
mod_lua | LuaPackageCPath | All | LuaPackageCPath /path/to/include/?.soa | Add a directory to lua’s package.cpath | |
mod_lua | LuaPackagePath | All | LuaPackagePath /path/to/include/?.lua | Add a directory to lua’s package.path | |
mod_lua | LuaRoot | All | LuaRoot /path/to/a/directory | Specify the base path for resolving relative paths for mod_lua directives | |
mod_lua | LuaScope | LuaScope once | All | LuaScope once|request|conn|thread|server [min] [max] | One of once, request, conn, thread — default is once |
mod_mime | AddCharset | FileInfo | AddCharset charset extension | Maps the given filename extensions to the specified content | |
mod_mime | AddEncoding | FileInfo | AddEncoding encoding extension | Maps the given filename extensions to the specified encoding | |
mod_mime | AddHandler | FileInfo | AddHandler handler-name extension | Maps the filename extensions to the specified | |
mod_mime | AddInputFilter | FileInfo | AddInputFilter filter[;filter...] | Maps filename extensions to the filters that will process | |
mod_mime | AddLanguage | FileInfo | AddLanguage language-tag extension | Maps the given filename extension to the specified content | |
mod_mime | AddOutputFilter | FileInfo | AddOutputFilter filter[;filter...] | Maps filename extensions to the filters that will process | |
mod_mime | AddType | FileInfo | AddType media-type extension | Maps the given filename extensions onto the specified content | |
mod_mime | DefaultLanguage | FileInfo | DefaultLanguage language-tag | Defines a default language-tag to be sent in the Content-Language | |
mod_mime | MultiviewsMatch | MultiviewsMatch NegotiatedOnly | FileInfo | MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers | The types of files that will be included when searching for |
mod_mime | RemoveCharset | FileInfo | RemoveCharset extension [extension] | Removes any character set associations for a set of file | |
mod_mime | RemoveEncoding | FileInfo | RemoveEncoding extension [extension] | Removes any content encoding associations for a set of file | |
mod_mime | RemoveHandler | FileInfo | RemoveHandler extension [extension] | Removes any handler associations for a set of file | |
mod_mime | RemoveInputFilter | FileInfo | RemoveInputFilter extension [extension] | Removes any input filter associations for a set of file | |
mod_mime | RemoveLanguage | FileInfo | RemoveLanguage extension [extension] | Removes any language associations for a set of file | |
mod_mime | RemoveOutputFilter | FileInfo | RemoveOutputFilter extension [extension] | Removes any output filter associations for a set of file | |
mod_mime | RemoveType | FileInfo | RemoveType extension [extension] | Removes any content type associations for a set of file | |
mod_negotiation | ForceLanguagePriority | ForceLanguagePriority Prefer | FileInfo | ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback] | Action to take if a single acceptable document is not |
mod_negotiation | LanguagePriority | FileInfo | LanguagePriority MIME-lang [MIME-lang] | The precedence of language variants for cases where | |
mod_proxy_fcgi | ProxyFCGIBackendType | ProxyFCGIBackendType FPM | ProxyFCGIBackendType FPM|GENERIC | Specify the type of backend FastCGI application | |
mod_proxy_fcgi | ProxyFCGISetEnvIf | ProxyFCGISetEnvIf conditional-expression | Allow variables sent to FastCGI servers to be fixed up | ||
mod_reflector | ReflectorHeader | Options | ReflectorHeader inputheader [outputheader] | Reflect an input header to the output headers | |
mod_rewrite | RewriteBase | None | FileInfo | RewriteBase URL-path | Sets the base URL for per-directory rewrites |
mod_rewrite | RewriteCond | FileInfo | RewriteCond | Defines a condition under which rewriting will take place | |
mod_rewrite | RewriteEngine | RewriteEngine off | FileInfo | RewriteEngine on|off | Enables or disables runtime rewriting engine |
mod_rewrite | RewriteOptions | FileInfo | RewriteOptions Options | Sets some special options for the rewrite engine | |
mod_rewrite | RewriteRule | FileInfo | RewriteRule | Defines rules for the rewriting engine | |
mod_sed | InputSed | InputSed sed-command | Sed command to filter request data (typically POST data) | ||
mod_sed | OutputSed | OutputSed sed-command | Sed command for filtering response content | ||
mod_session | Session | Session Off | AuthConfig | Session On|Off | Enables a session for the current directory or location |
mod_session | SessionEnv | SessionEnv Off | AuthConfig | SessionEnv On|Off | Control whether the contents of the session are written to the |
mod_session | SessionExclude | none | SessionExclude path | Define URL prefixes for which a session is ignored | |
mod_session | SessionHeader | none | AuthConfig | SessionHeader header | Import session updates from a given HTTP response header |
mod_session | SessionInclude | all URLs | AuthConfig | SessionInclude path | Define URL prefixes for which a session is valid |
mod_session | SessionMaxAge | SessionMaxAge 0 | AuthConfig | SessionMaxAge maxage | Define a maximum age in seconds for a session |
mod_session_cookie | SessionCookieName | none | SessionCookieName name attributes | Name and attributes for the RFC2109 cookie storing the session | |
mod_session_cookie | SessionCookieName2 | none | SessionCookieName2 name attributes | Name and attributes for the RFC2965 cookie storing the session | |
mod_session_cookie | SessionCookieRemove | SessionCookieRemove Off | SessionCookieRemove On|Off | Control for whether session cookies should be removed from incoming HTTP headers | |
mod_session_crypto | SessionCryptoCipher | aes256 | SessionCryptoCipher name | The crypto cipher to be used to encrypt the session | |
mod_session_crypto | SessionCryptoPassphrase | none | SessionCryptoPassphrase secret [ secret ... ] | The key used to encrypt the session | |
mod_session_dbd | SessionDBDCookieName | none | SessionDBDCookieName name attributes | Name and attributes for the RFC2109 cookie storing the session ID | |
mod_session_dbd | SessionDBDCookieName2 | none | SessionDBDCookieName2 name attributes | Name and attributes for the RFC2965 cookie storing the session ID | |
mod_session_dbd | SessionDBDCookieRemove | SessionDBDCookieRemove On | SessionDBDCookieRemove On|Off | Control for whether session ID cookies should be removed from incoming HTTP headers | |
mod_session_dbd | SessionDBDDeleteLabel | SessionDBDDeleteLabel deletesession | SessionDBDDeleteLabel label | The SQL query to use to remove sessions from the database | |
mod_session_dbd | SessionDBDInsertLabel | SessionDBDInsertLabel insertsession | SessionDBDInsertLabel label | The SQL query to use to insert sessions into the database | |
mod_session_dbd | SessionDBDPerUser | SessionDBDPerUser Off | SessionDBDPerUser On|Off | Enable a per user session | |
mod_session_dbd | SessionDBDSelectLabel | SessionDBDSelectLabel selectsession | SessionDBDSelectLabel label | The SQL query to use to select sessions from the database | |
mod_session_dbd | SessionDBDUpdateLabel | SessionDBDUpdateLabel updatesession | SessionDBDUpdateLabel label | The SQL query to use to update existing sessions in the database | |
mod_setenvif | BrowserMatch | FileInfo | BrowserMatch regex [!]env-variable[=value] | Sets environment variables conditional on HTTP User-Agent | |
mod_setenvif | BrowserMatchNoCase | FileInfo | BrowserMatchNoCase regex [!]env-variable[=value] | Sets environment variables conditional on User-Agent without | |
mod_setenvif | SetEnvIf | FileInfo | SetEnvIf attribute | Sets environment variables based on attributes of the request | |
mod_setenvif | SetEnvIfExpr | FileInfo | SetEnvIfExpr expr | Sets environment variables based on an ap_expr expression | |
mod_setenvif | SetEnvIfNoCase | FileInfo | SetEnvIfNoCase attribute regex | Sets environment variables based on attributes of the request | |
mod_speling | CheckCaseOnly | CheckCaseOnly Off | Options | CheckCaseOnly on|off | Limits the action of the speling module to case corrections |
mod_speling | CheckSpelling | CheckSpelling Off | Options | CheckSpelling on|off | Enables the spelling |
mod_ssl | SSLCipherSuite | SSLCipherSuite DEFAULT (depends on OpenSSL version) | AuthConfig | SSLCipherSuite [protocol] cipher-spec | Cipher Suite available for negotiation in SSL |
mod_ssl | SSLOptions | Options | SSLOptions [+|-]option ... | Configure various SSL engine run-time options | |
mod_ssl | SSLRenegBufferSize | SSLRenegBufferSize 131072 | AuthConfig | SSLRenegBufferSize bytes | Set the size for the SSL renegotiation buffer |
mod_ssl | SSLRequire | AuthConfig | SSLRequire expression | Allow access only when an arbitrarily complex | |
mod_ssl | SSLRequireSSL | AuthConfig | SSLRequireSSL | Deny access when SSL is not used for the | |
mod_ssl | SSLUserName | AuthConfig | SSLUserName varname | Variable name to determine user name | |
mod_ssl | SSLVerifyClient | SSLVerifyClient none | AuthConfig | SSLVerifyClient level | Type of Client Certificate verification |
mod_ssl | SSLVerifyDepth | SSLVerifyDepth 1 | AuthConfig | SSLVerifyDepth number | Maximum depth of CA Certificates in Client |
mod_substitute | Substitute | FileInfo | Substitute s/pattern/substitution/[infq] | Pattern to filter the response content | |
mod_substitute | SubstituteInheritBefore | SubstituteInheritBefore off | FileInfo | SubstituteInheritBefore on|off | Change the merge order of inherited patterns |
mod_substitute | SubstituteMaxLineLength | SubstituteMaxLineLength 1m | FileInfo | SubstituteMaxLineLength bytes(b|B|k|K|m|M|g|G) | Set the maximum line size |
mod_usertrack | CookieDomain | FileInfo | CookieDomain domain | The domain to which the tracking cookie applies | |
mod_usertrack | CookieExpires | FileInfo | CookieExpires expiry-period | Expiry time for the tracking cookie | |
mod_usertrack | CookieName | CookieName Apache | FileInfo | CookieName token | Name of the tracking cookie |
mod_usertrack | CookieStyle | CookieStyle Netscape | FileInfo | CookieStyle | Format of the cookie header field |
mod_usertrack | CookieTracking | CookieTracking off | FileInfo | CookieTracking on|off | Enables tracking cookie |
mod_version | <IfVersion> | All | <IfVersion [[!]operator] version> ... | contains version dependent configuration | |
mod_xml2enc | xml2EncDefault | xml2EncDefault name | Sets a default encoding to assume when absolutely no information | ||
mod_xml2enc | xml2StartParse | xml2StartParse element [element ...] | Advise the parser to skip leading junk. |
“.htaccessで使用可能な指令一覧” に対して1件のコメントがあります。