Apache2.2から2.4へのhttpd.confの記載方法変更

書いてあること

Apache2.2から2.4に乗り換える必要があったためhttpd.confの記載変更点をまとめた。
 
詳細は
を参照。

変更点

 
  2.2での記法 2.4での記法 備考
アクセス管理記法が変更された Order deny,allow
Deny from all
Require all denied  
  Order allow,deny
Allow from all
Require all granted  
  Order Deny,Allow
Deny from all
Allow from example.org
Require host example.org  
  Order Deny,Allow
Allow from all
AuthType Basic
AuthBasicProvider file
AuthUserFile /example.com/conf/users.passwd
AuthName secure
Require valid-user
AuthType Basic
AuthBasicProvider file
AuthUserFile /example.com/conf/users.passwd
AuthName secure
Require valid-user
ユーザ単位の認証が記載されている場合、Host単位の認証は省略可能(Deny, Allow扱い)
  Order allow,deny
Deny from all
# Satisfy ALL is the default
Satisfy ALL
Allow from 127.0.0.1
AuthType Basic
AuthBasicProvider file
AuthUserFile /example.com/conf/users.passwd
AuthName secure
Require valid-user
AuthType Basic
AuthBasicProvider file
AuthUserFile /example.com/conf/users.passwd
AuthName secure
<RequireAll>
Require valid-user
Require ip 127.0.0.1
</RequireAll>
ホスト認証+ユーザ認証を併用する場合はRequireを<RequireAll>で囲って併記する記法を用いる
変数名の変更 MaxRequestsPerChild MaxConnectionsPerChild  
  MaxClients MaxRequestWorkers  
廃止 DefaultType -  
デフォルト挙動の変更 AllowOverride   デフォルトの挙動がNoneに(.htaccess ファイルが無視される)
  EnableSendfile   デフォルトでOFFに
  FileETag   デフォルトでOFFに
パラメータの変更 KeepAlive   OnかOffのみを受け付けるように
(以前は0がOffに、それ以外の文字はOnの代替として挙動)
モジュールの変更 mod_dav_fs   DavLockDB ファイルのフォーマットが変更されているため古いファイルは削除する必要あり
  mod_cache   CacheIgnoreURLSessionIdentifiers が部分一致ではなく完全一致に変更
  mod_cache   2.2以前では/がすべてのコンテンツとマッチしたが、マッチ範囲が厳密に
  mod_ldap   LDAPTrustedClientCertがディレクトリ単位の設定のみに変更
  mod_filter   FilterProvider の記法が変更(ブール記法で判定)
  mod_include   ・#if expr 記法が新しい文法に変更
ディレクトリスコープのSSI*設定が他のディレクトリのSSI*設定を上書きしないように
  mod_charset_lite   DebugLevelが廃止されモジュール単位のLogLevelで設定する形に
  mod_ext_filter   同上
  mod_proxy_scgi   PATH_INFOのデフォルト設定が変更
  mod_ssl   CRLに基づくrevocation checkingはSSLCARevocationCheck による明示的な設定が必要に
  mod_substitute   最大のline長が1MBに
  mod_reqtimeout   モジュールロード時に幾つかのデフォルトのタイムアウトを設定
  mod_dumpio   DumpIOLogLevel のサポートが終了し、LogLevelがtrace7に固定