请选择 进入手机版 | 继续访问电脑版
 找回密码
 立即注册
首页 社区 运维 Apache2.2和Apache2.4中httpd.conf配置文件的异同 ...

Apache2.2和Apache2.4中httpd.conf配置文件的异同

猿梦 2023-1-3 11:57:04
Windows环境从Apache2.2改成Apache2.4后httpd.conf中的设置异同。1、权限设定方式变更2.2使用Order Deny / Allow的方式,2.4改用Requireapache2.2:Order deny,allowDeny from allapache2.4:Require all denied此处比较常用的有如下几种:Require all deniedRequire all grantedRequire host Require ip 192.168.1 192.168.2Require local注意:若有设定在htaccess文件中的也要修改2、设定日志纪录方式变更RewriteLogLevel 指令改为 logLevelLOGLEVEL设置第一个值是针对整个Apache的预设等级,后方可以对指定的模块修改此模块的日志记录等级比如:LogLevel warn rewrite: warn3、Namevirtualhost 被移除4、需载入更多的模块开启Gzip在apache2.2中需载入mod_deflate,apache2.4中需载入mod_filter和mod_deflate开启SSL在apache2.2中需载入mod_ssl,apache2.4中需载入mod_socache_shmcb和mod_ssl5、在windows环境建议的设置EnableSendfile OffEnableMMAP Off当Log日志出现AcceptEx failed等错误时建议设置AcceptFilter http noneAcceptFilter https none说明:Win32DisableAcceptEx在apache2.4中被AcceptFilter None取代6、Listen设定的调整以443为例,不可以只设定Listen 443会出现以下错误:(OS)一次只能用一个通讯端地址(通讯协定/网路位址/连接) : AH00072: make_sock: could not bind to address [::]:443(OS)一次只能用一个通讯端地址(通讯协定/网路位址/连接) : AH00072: make_sock: could not bind to address 0.0.0.0:443AH00451: no listening sockets available, shutting downAH00015: Unable to open logs因此需指定监听的IP,可设定多个
电脑电脑贴上'我电脑脱下*Windows环境从Apache2.2改成Apache2.4后httpd.conf中的设置异同。1、权限设定方式变更2.2使用Order Deny / Allow的方式,2.4改用Requireapache2.2:Order deny,allowDeny from allapache2.4:Require all denied此处比较常用的有如下几种:Require all deniedRequire all grantedRequire host Require ip 192.168.1 192.168.2Require local注意:若有设定在htaccess文件中的也要修改2、设定日志纪录方式变更RewriteLogLevel 指令改为 logLevelLOGLEVEL设置第一个值是针对整个Apache的预设等级,后方可以对指定的模块修改此模块的日志记录等级比如:LogLevel warn rewrite: warn3、Namevirtualhost 被移除4、需载入更多的模块开启Gzip在apache2.2中需载入mod_deflate,apache2.4中需载入mod_filter和mod_deflate开启SSL在apache2.2中需载入mod_ssl,apache2.4中需载入mod_socache_shmcb和mod_ssl5、在windows环境建议的设置EnableSendfile OffEnableMMAP Off当Log日志出现AcceptEx failed等错误时建议设置AcceptFilter http noneAcceptFilter https none说明:Win32DisableAcceptEx在apache2.4中被AcceptFilter None取代6、Listen设定的调整以443为例,不可以只设定Listen 443会出现以下错误:(OS)一次只能用一个通讯端地址(通讯协定/网路位址/连接) : AH00072: make_sock: could not bind to address [::]:443(OS)一次只能用一个通讯端地址(通讯协定/网路位址/连接) : AH00072: make_sock: could not bind to address 0.0.0.0:443AH00451: no listening sockets available, shutting downAH00015: Unable to open logs因此需指定监听的IP,可设定多个
孤他们写完了作文,电脑杯子拿走了工资#2.4肯定向下兼容的。

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册