您好,欢迎访问一九零五行业门户网

apache 2.2 2.4 区别

windows环境从apache2.2改成apache2.4后httpd.conf中的设置异同。
1、权限设定方式变更
2.2使用order deny / allow的方式,2.4改用require
apache2.2:
order deny,allow
deny from all
apache2.4:
require all denied
此处比较常用的有如下几种:
require all deniedrequire all grantedrequire host xxx.comrequire ip 192.168.1 192.168.2require local
注意:若有设定在htaccess文件中的也要修改
2、设定日志记录方式变更
rewriteloglevel 指令改为 loglevel
loglevel设置第一个值是针对整个apache的预设等级,后方可以对指定的模块修改此模块的日志记录等级
比如:
loglevel warn rewrite: warn
3、namevirtualhost 被移除
4、需载入更多的模块
开启gzip在apache2.2中需载入mod_deflate,apache2.4中需载入mod_filter和mod_deflate
开启ssl在apache2.2中需载入mod_ssl,apache2.4中需载入mod_socache_shmcb和mod_ssl
5、在windows环境建议的设置
enablesendfile offenablemmap off
当log日志出现acceptex failed等错误时建议设置
acceptfilter http noneacceptfilter https none
说明:win32disableacceptex在apache2.4中被acceptfilter none取代
6、listen设定的调整
以443为例,不可以只设定listen 443
会出现以下错误:
(os 10048)一次只能用一个通讯端地址(通讯协定/网路位址/连接) : ah00072: make_sock: could not bind to address [::]:443
(os 10048)一次只能用一个通讯端地址(通讯协定/网路位址/连接) : ah00072: make_sock: could not bind to address 0.0.0.0:443
ah00451: no listening sockets available, shutting down
ah00015: unable to open logs
因此需指定监听的ip,可设定多个
更多apache相关技术文章,请访问apache使用教程栏目进行学习!
以上就是apache 2.2 2.4 区别的详细内容。
其它类似信息

推荐信息