2018-05-22 Apache2.2から2.4へのhttpd.confの記載方法変更 書いてあること Apache2.2から2.4に乗り換える必要があったためhttpd.confの記載変更点をまとめた。 詳細は https://httpd.apache.org/docs/2.4/upgrading.html を参照。 変更点 2.2での記法 2.4での記法 備考 アクセス管理記法が変更された Order deny,allowDeny from all Require all denied Order allow,denyAllow from all Require all granted Order Deny,AllowDeny from allAllow from example.org Require host example.org Order Deny,AllowAllow from allAuthType BasicAuthBasicProvider fileAuthUserFile /example.com/conf/users.passwdAuthName secureRequire valid-user AuthType BasicAuthBasicProvider fileAuthUserFile /example.com/conf/users.passwdAuthName secureRequire valid-user ユーザ単位の認証が記載されている場合、Host単位の認証は省略可能(Deny, Allow扱い) Order allow,denyDeny from all# Satisfy ALL is the defaultSatisfy ALLAllow from 127.0.0.1AuthType BasicAuthBasicProvider fileAuthUserFile /example.com/conf/users.passwdAuthName secureRequire valid-user AuthType BasicAuthBasicProvider fileAuthUserFile /example.com/conf/users.passwdAuthName secure<RequireAll>Require valid-userRequire 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に固定