Apache Httpd Server 2.2升级2.4
Apache Httpd Server 2.2升级2.4




(2 votes, average: 5.00 out of 5)2,302 views 2012 年 3 月 20 日Web服务器、服务器apache、httpd、server、升级jsxubar
apache httpd server 2.2升级2.4 时,因为 2.4 相对于 2.2 有一些变动,在配置文件和安装都有变化。本文提出了在 2.2升级2.4 时需要注意的地方和解决升级过程中一些常见问题。
目录 [显示]
2.2升级2.4注意事项
1.编译时配置变化
- 模块mod_authn_default, mod_authz_default, mod_mem_cache已经移除,如果在2.2版本使用mod_mem_cache模块,在2.4中使用mod_cache_disk. 所有负载均衡实现已经移动到了单独的,自包含的mod_proxy子模块中,如mod_lbmethod_bybusyness.如果在配置文件中使用这 些模块,可能需要进行编译和加载.
- 对BeOS,TPF和更老的平台,如A/UX,Next和Tandem的支持已经移除.
- 默认编译动态模块
- 默认只加载模块的一个基本子集,其它的被注释掉了
- 默认编译most模块设定
- the “reallyall” module set adds developer modules to the “all” set
- apr和apr-util没有打包在httpd 2.4里面.你可以选择已经安装的版本或者下载apr和apr-util,然后解压apr/apr-util到./srclib目录,使用–with-included-apr参数进行编译
2.运行时配置变化
- 包含认证配置方面的显著变化和其它一些小变化,认证配置方面的变化在常见问题中讲.其它小变化包括:
- MaxRequestsPerChild重命名为MaxConnectionsPerChild,描述更加准确.
- MaxClients重命名为MaxRequestWorkers,描述更加准确.对于异步MPM,如event,最大客户端数量不等于工作线程数量.旧的名字仍然支持.
- DefaultType设定项不再产生作用,如果你用了,只会产生一个警告,使用其它设置进行替换.
- EnableSendfile现在默认关闭.
- FileETag现在默认为”MTime Size” (without INode).
- mod_log_config: ${cookie}C matches whole cookie names. Previously any substring would match.
- mod_dav_fs: The format of the DavLockDB file has changed for systems with inodes. The old DavLockDB file must be deleted on upgrade.
- KeepAlive only accepts values of On or Off. Previously, any value other than “Off” or “0″ was treated as “On”.
- Directives AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex, and WatchdogMutexPath have been replaced with a single Mutex directive. You will need to evaluate any use of these removed directives in your 2.2 configuration to determine if they can just be deleted or will need to be replaced using Mutex.
- mod_cache: CacheIgnoreURLSessionIdentifiers now does an exact match against the query string instead of a partial match. If your configuration was using partial strings, e.g. using sessionid to match /someapplication/image.gif;jsessionid=123456789, then you will need to change to the full string jsessionid.
- mod_ldap: LDAPTrustedClientCert is now consistently a per-directory setting only. If you use this directive, review your configuration to make sure it is present in all the necessary directory contexts.
- mod_filter: FilterProvider syntax has changed and now uses a boolean expression to determine if a filter is applied.
- mod_include:
- The #if expr element now uses the new expression parser. The old syntax can be restored with the new directive SSILegacyExprParser.
- An SSI* config directive in directory scope no longer causes all other per-directory SSI* directives to be reset to their default values.
- mod_charset_lite: The DebugLevel option has been removed in favour of per-module LogLevel configuration.
- mod_ext-filter: The DebugLevel option has been removed in favour of per-module LogLevel configuration.
- mod_ssl: CRL based revocation checking now needs to be explicitly configured through SSLCARevocationCheck.
- mod_substitute: The maximum line length is now limited to 1MB.
- mod_reqtimeout: If the module is loaded, it will now set some default timeouts.
3.其它杂项
- mod_autoindex: will now extract titles and display descriptions for .xhtml files, which were previously ignored.
- mod_ssl: The default format of the *_DN variables has changed. The old format can still be used with the new LegacyDNStringFormat argument to SSLOptions. The SSLv2 protocol is no longer supported.
- htpasswd now uses MD5 hash by default on all platforms.
- The NameVirtualHost directive no longer has any effect, other than to emit a warning. Any address/port combination appearing in multiple virtual hosts is implicitly treated as a name-based virtual host.
- mod_deflate will now skip compression if it knows that the size overhead added by the compression is larger than the data to be compressed.
- Multi-language error documents from 2.2.x may not work unless they are adjusted to the new syntax of mod_include’s #if expr= element or the directive SSILegacyExprParser is enabled for the directory containing the error documents.
4.第三方模块
- 所有模块在加载前必须重新编译.
2.2升级2.4升级过程中的常见问题
在2.2升级2.4的时候,因为有一些模块没有用了,又新加了一些模块,因此可能提示错误。以下是常见错误的解决方法。
Startup errors(启动错误)
错误提示: Invalid command ‘User’
|
1
|
Invalid command 'User', perhaps misspelled or defined by a module not included in the server configuration |
解决办法: 加载模块:mod_unixd,在httpd.conf中添加:
|
1
|
LoadModule unixd_module modules/mod_unixd.so |
错误提示: Invalid command ‘Require’
|
1
|
Invalid command 'Require', perhaps misspelled or defined by a module not included in the server configuration |
或者:
|
1
|
Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration |
解决办法有两种:
第一种:加载兼容模块 mod_access_compat ,在 httpd.conf 中添加:
|
1
|
LoadModule access_compat_module modules/mod_access_compat.so |
第二种:更新配置文件到2.4版本的语法.
包括以下两步:
第一步:加载相应模块,在 httpd.conf 中添加:
|
1
2
|
LoadModule authz_core_module modules/mod_authz_core.soLoadModule authz_host_module modules/mod_authz_host.so |
第二步:修改配置文件语法,此处举几个例子:
2.2 版本:
|
1
2
|
Order deny,allowDeny from all |
2.4 版本:
|
1
|
Require all denied |
2.2 版本:
|
1
2
|
Order allow,denyAllow from all |
2.4 版本:
|
1
|
Require all granted |
2.2 版本:
|
1
2
3
|
Order Deny,AllowDeny from allAllow from example.org |
2.4 版本:
|
1
|
Require host example.org |
错误提示: Ignoring deprecated use of DefaultType
|
1
|
Ignoring deprecated use of DefaultType in line NN of /path/to/httpd.conf |
解决办法:移除 DefaultType ,使用其它配置设置.
在处理请求时的错误
错误提示: configuration error: couldn’t check user: /path
|
1
|
configuration error: couldn't check user: /path |
解决办法:加载模块: mod_authn_core . 加载方法与上面讲的类似.
Apache Httpd Server 2.2升级2.4的更多相关文章
- 使用mod_cluster进行apache httpd server和jboss eap 6.1集群配置
本文简单介绍,使用mod_cluster进行apache httpd server和jboss eap 6.1集群配置.本配置在windows上测试通过,linux下应该是一样的.可能要稍作调整.后面 ...
- 转:Fuzzing Apache httpd server with American Fuzzy Lop + persistent mode
Fuzzing Apache httpd server with American Fuzzy Lop + persistent mode 小结:AFL主要以文件作为输入进行fuzz,本文介绍如何对网 ...
- Apache httpd Server 配置正向代理
背景 代理(Proxy),位于客户端与实际服务端之间,当客户端需要请求服务端内容时,先向代理发起请求,代理将请求转发到实际的服务器,再原路返回.也可以在代理服务器设置缓存,将实际服务器上不常变化的内容 ...
- apache httpd 从2.2升级到2.4的过程及中间遇到的坑
背景描述: 最近集团在做安全扫描,扫出了http的漏洞,一看是监控nagios涉及到的httpd,于是就考虑将httpd升级到最新的版本,在升级的过程中,真是遇到了很多的坑,弄了2天终于搞定了,现在梳 ...
- Apache httpd Server Notes
1. httpd启动.停止以及重启 启动: apachectl –f $PATH_TO_CONF/httpd.conf 停止及重启 apachectl –k stop/restart/graceful ...
- 查看apache httpd server中加载了哪些模块
说明: 有的时候,需要查看当前apache中都加载了哪些模块,通过以下命令进行查看 [root@hadoop1 httpd-]# bin/apachectl -t -D DUMP_MODULES Lo ...
- Apache httpd.conf配置文件 2(Main server configuration)
### Section 2: 'Main' server configuration # # The directives in this section set up the values used ...
- Nginx为什么比Apache Httpd高效:原理篇
一.进程.线程? 进程是具有一定独立功能的,在计算机中已经运行的程序的实体.在早期系统中(如linux 2.4以前),进程是基本运作单位,在支持线程的系统中(如windows,linux2.6)中,线 ...
- Apache HTTP Server多个拒绝服务漏洞
漏洞版本: Apache Group Apache HTTP Server < 2.4.9 漏洞描述: BUGTRAQ ID: 66303 CVE ID: CVE-2013-6438,CVE-2 ...
随机推荐
- Codeforces Round #257 (Div. 2/A)/Codeforces450A_Jzzhu and Children
解题报告 没什么好说的,大于m的往后面放,,,re了一次,,, #include <iostream> #include <cstdio> #include <cstri ...
- Java Main如何被执行?(转)
java应用程序的启动在/hotspot/src/share/tools/launcher/java.c的main()函数中,而在虚拟机初始化过程中,将创建并启动Java的Main线程.最后将调用JN ...
- Android开发模板------自己定义SimpleCursorAdapter的使用
使用SimpleCursorAdapter所设计的table(数据表)一定要有_id字段名称,否则会出现"找不到_id"的错误 SimpleCursorAdapter直接使用的方法 ...
- HTTP必知必会(转)
HTTP协议作为网络传输的基本协议,有着广泛的应用.HTTP协议的完整内容很多,但是其核心知识却又简单精炼.学习者应该掌握其基本结构,并且能够举一反三.这篇文章所列的,就是在实际开发中必须知道必须掌握 ...
- C++ Primer 学习笔记_56_ 类和数据抽象 --消息处理演示示例
拷贝控制 --消息处理演示样例 说明: 有些类为了做一些工作须要对复制进行控制. 为了给出这种样例,我们将概略定义两个类,这两个类可用于邮件处理应用程序.Message类和 Folder类分别表示电子 ...
- 大数据系列修炼-Scala课程09
Option使用和实现内幕源码揭晓 1.Option中的sealed关键字解析:Option中用了sealed,定义的case class与case object必须在同一个文件中.Option在模式 ...
- hibernate中使用sql语句进行表链接查询,对结果集的遍历方法
今天做了一个在hibernate中使用sql语句进行表链接查询的功能,得到的属性是来自两个表中的字段.下面对结果集遍历的方法进行记录. sql语句不写了.部分代码如下: List<Course_ ...
- Xcode6为什么干掉pch(Precompile Prefix Header)&怎样加入pch文件
一直在用xcode6开发,但项目都是在xcode5上创建的,所以一直没注意到,xcode6居然干掉pch文件了. 为什么xcode6没有自己主动创建pch文件呢? 简单地看:我们在写项目的时候,大部分 ...
- MyEclipse优化全攻略
(0) 吐槽 Eclipse仅仅是个半成品有木有?什么都须要自己安装插件,新手非常难用有木有? 安装上插件以后了版本号兼容和各种问题烦死人有木有? 都怪碎片和版本号乱公布有木有? IntelliJ I ...
- 饼干怪兽和APT攻击
APT攻击就像一个孩子,你通过各种方式窃取他们的大脑要拿出饼干,为了防止恶意攻击,过失作为母亲未能发现和防止饼干盗窃贼如.于她仅仅监视厨房椅子.衣柜门或烤箱门的开启.建立起有效防御目标攻击与APT攻击 ...