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服务器服务器apachehttpdserver升级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.so

LoadModule authz_host_module modules/mod_authz_host.so

第二步:修改配置文件语法,此处举几个例子:
2.2 版本:


1

2

Order deny,allow

Deny from all

2.4 版本:


1

Require all denied

2.2 版本:


1

2

Order allow,deny

Allow 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 . 加载方法与上面讲的类似.

时间: 2024-08-05 06:40:20

Apache Httpd Server 2.2升级2.4的相关文章

apache httpd server

web 服务介绍 web服务时一种应用程序的服务,它所提供的最主要的信息是一种超文本标记语言(HTML).多媒体资源(如:视频.图片.音乐等).HTML是一种纯文字的文本信息,通过所谓的标签来规范所要显示的内容格式,在客户端通过浏览器的形式对HTML及多媒体资源进行解析,然后呈现在终端上.主要由http和https协议实现 http协议 HTTP是一个属于应用层的面向对象的协议,B/S架构,由于其简单.快速的方式,适用于分布式超媒体信息系统.它于1990年提出,经过几年的使用与发展,得到不断的完

Apache httpd Server Notes

1. httpd启动.停止以及重启 启动: apachectl –f $PATH_TO_CONF/httpd.conf 停止及重启 apachectl –k stop/restart/graceful-stop/graceful 其中 graceful-stop及graceful会将当前处理中的请求处理完毕,而不是直接关闭并丢弃所有连接. 2. 配置项解释 <IfDefine SomeParam> 如果在httpd启动时给定了特定的参数,则生效.比如:httpd –DClosedForNow

apache http server(httpd) 下載安裝

參考文檔:http://jingyan.baidu.com/article/29697b912f6539ab20de3cf8.html 1.搜索apache官網,找到apache http server(httpd)欄位,window的去到Files for Microsoft Windows 2.然後在 ApacheHaus Apache Lounge BitNami WAMP Stack WampServer XAMPP 中選前3個,點擊進去就能下載,下載後 , 解壓到應用目錄,不要有空格

Apache(httpd) 报错You don&#39;t have permission to access /on this server.

项目需要,增加个访问端口,指向不同目录. 但是一直报"You don't have permission to access /on this server."错误 配置文件语法检查: #/etc/init.d/httpd configtest 或 apachectl -t 直接输入:/etc/init.d/httpd 会新显示选项 [[email protected] ~]# /etc/init.d/httpd  Usage: httpd {start|stop|restart|co

Nginx为什么比Apache Httpd高效:原理篇

一.进程.线程? 进程是具有一定独立功能的,在计算机中已经运行的程序的实体.在早期系统中(如linux 2.4以前),进程是基本运作单位,在支持线程的系统中(如windows,linux2.6)中,线程才是基本的运作单位,而进程只是线程的容器.程序 本身只是指令.数据及其组织形式的描述,进程才是程序(那些指令和数据)的真正运行实例.若干进程有可能与同一个程序相关系,且每个进程皆可以同步(循 序)或异步(平行)的方式独立运行.现代计算机系统可在同一段时间内以进程的形式将多个程序加载到存储器中,并借

Nginx为什么比Apache Httpd高效

转载于:http://www.toxingwang.com/linux-unix/linux-basic/1712.html 一.进程.线程? 在回答nginx 为什么比apache更高效之前,必须要先熟悉.了解下概念:什么是进程,什么是线程,什么是程序 ,程序的运行方式? 进程:是具有一定独立功能的,在计算机中已经运行的程序的实体.在早期系统中(如linux 2.4以前),进程是基本运作单位. 线程:在支持线程的系统中(如windows,linux2.6)中,线程才是基本的运作单位,而进程只是

Apache HTTP Server 与 Tomcat 的三种连接方式介绍

Apache HTTP Server 与 Tomcat 的三种连接方式介绍 整合 Apache Http Server 和 Tomcat 可以提升对静态文件的处理性能.利用 Web 服务器来做负载均衡以及容错.无缝的升级应用程序.本文介绍了三种整合 Apache 和 Tomcat 的方式. 3 评论: 刘 冬 ([email protected]), 开发工程师, 2007 年 1 月 15 日 内容 首先我们先介绍一下为什么要让 Apache 与 Tomcat 之间进行连接.事实上 Tomca

由浅入深学习Apache httpd原理与配置

一.apache简介: Apache HTTPD又可以简称为httpd或者Apache,它是Internet使用最广泛的web服务器之一,使用Apache提供的web服务器是由守护进程httpd,通过http协议进行文本传输,默认使用80端口的明文传输方式,当然,后来,为了保证数据的安全和可靠性,又添加了443的加密传输的方式,Apache提供的服务器又被称为:补丁服务器,原因很简单,它是一款高度模块化的软件,想要给它添加相应的功能只需添加相应的模块,让其Apache主程序加载相应的模块,不需要

Apache http Server 新版本安装与配置

前言 Apache官网从2.2之后,不再提供windows的msi或exe安装版本,现在Apache http Server有两个分支2.2及2.4 注:如果之前有安装2.2的版本,请先卸载 下载 1.进入apache官网:https://httpd.apache.org/download.cgi 2.选择2.4的版本,点击 Files for Microsoft Windows  (windows安装版本) 3.选择前三个网站中的任意一下进入下载,(推荐Apache Lounge镜像站点快)