標籤:http mmap 開啟 span socket xxx apache UI ssl
Windows環境從Apache2.2改成Apache2.4後httpd.conf中的設定異同。
1、許可權設定方式變更
2.2使用Order Deny / Allow的方式,2.4改用Require
apache2.2:
Order deny,allowDeny from all
apache2.4:
Require all denied
此處比較常用的有如下幾種:
Require all denied
Require all granted
Require host xxx.com
Require ip 192.168.1 192.168.2
Require 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 Off
EnableMMAP 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,可設定多個
例如:
Listen 192.168.2.1:443Listen 127.0.0.1:443
Apache2.2和Apache2.4中httpd.conf設定檔 許可權的異同