因為有些目錄希望只有特定的IP可以存取的到。
所以有這個需求。
下面這個目錄的原始設定
<Directory "C:\\web\\aaaacccc\\">
AddDefaultCharset UTF-8
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
Order Allow,Deny
Allow from all
</Directory>
這樣的設定是誰都可以讀取。
<Directory "C:\\web\\aaaacccc\\">
AddDefaultCharset UTF-8
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
Order Allow,Deny
Allow from 192.168.1.1
</Directory>
這樣修改後,就變成只有這個 192.168.1.1 可以連進去。但是可以在進一步設定加上 ErrorDocument 403
<Directory "C:\\web\\aaaacccc\\">
AddDefaultCharset UTF-8
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
Order Allow,Deny
Allow from 192.168.1.1
ErrorDocument 403 http://tw.yahoo.com
</Directory>
這樣子只要連到這個目錄下的位置,只要ip不對,就會被轉向yahoo,連403

我們公司某個網頁用apache struts 2.3.15.3 環境是windows server 2012 standard 因為資策會公告有安全漏洞, 所以要更新到2.3.32 只是這系統很久之前負責人已離職, 因此上網求救如何更新, 需要詳細步驟,感恩!
這個在apache conf 射定擋裡面有。 你需要多翔細? 你現在是要更換apache版本還是?