在Apache2.4中需要使用Require訪問(wèn)控制指令。使用require指令…
當(dāng)前位置:網(wǎng)站首頁(yè) > 幫助中心 > 正文
在Apache2.4中需要使用Require訪問(wèn)控制指令。使用require指令時(shí),需要在指令外添加<RequireAll></RequireAll>標(biāo)簽對(duì),否則重啟Apache2.4加載規(guī)則時(shí)將出現(xiàn)錯(cuò)誤:” negative Require directive has no effect in <RequireAny> directive “。
下面對(duì)Require指令的使用進(jìn)行說(shuō)明:
<Directory /www/> Options FollowSymLinks AllowOverride All SetEnvIfNoCase User-Agent ^.*Apache-HttpClient.* bad_bot #User-Agent包含Apache-HttpClient的規(guī)則 <RequireAll> Require all granted #允許所有 Require all denied #拒絕所有 Require not ip 64.64.108.70 #屏蔽IP Require not ip 64.64 #屏蔽IP段 Require not env bad_bot #屏蔽上面設(shè)置的規(guī)則 </RequireAll> </Directory>
客服
熱線
133 9152 9507
7*24小時(shí)客服服務(wù)熱線