如何安裝 Mod_Security 和 Apache 網頁伺服器專用的 Mod_Evasive ?

說明
Mod_Security : Mod_Security 是一個網頁應用層的防火牆 (Web Application Firewall, WAF) 與網頁應用層的入侵偵測及防範系統。用來保護並監視即時的 HTTP 流量。

Mod_Evasive : 幫 Apache 網頁伺服器裝設 mod_evasive20 以免被 “暴力性攻擊”、DOS 或 DDOS。它也會在流量不正常時透過 email 或系統 log 送出異常報告資訊。 Continue reading “如何安裝 Mod_Security 和 Apache 網頁伺服器專用的 Mod_Evasive ?”

如何設定 Apache 網頁伺服器以壓縮輸出的網頁或資源檔案?

說明
一般搜尋引擎會建議網站的伺服器對其輸出的網頁或資源檔案啟用壓縮功能以減少網路上資料傳輸量、節省珍貴的頻寬 (這省的只有伺服器到使用者的網頁瀏覽這個方向的頻寬)。因為一般網頁伺服器以及瀏覽器所在的電腦這兩者都還有剩餘運算量,且壓縮過、小一點的資料能讓整個頁面資料快速地通過壅塞的傳輸網路上的各節點,所以也可以使得網頁頁面呈現速度變快。
這一篇文章要介紹 Apache 網頁伺服器 (Apache Web Server) 上要如何設定以啟用壓縮功能,將輸出的網頁或資源檔案做壓縮後再送往瀏覽器端。也就是,開啟 mod_deflate 壓縮輸出的網頁或資源檔案以節省頻寬 (一般可省 2~3 倍以上)。 Continue reading “如何設定 Apache 網頁伺服器以壓縮輸出的網頁或資源檔案?”

[架站] 為什麼網站的根目錄最好有 favicon.ico 和 robots.txt 存在?

o 如果已經在頁面的 <head> 中寫了 <link rel=”shortcut icon” href=”http://example.com/myicon.ico” /> 是否就不用在網站的根目錄中多弄一個 favicon.ico ?

o 如果所有頁面內容都不限制搜尋引擎的 bots 抓取,是否就不用在網站的根目錄中多弄一個 robots.txt ?

這一篇的結論是:還是讓它們存在網站的根目錄比較好。

Continue reading “[架站] 為什麼網站的根目錄最好有 favicon.ico 和 robots.txt 存在?”

[Apache][WP] 解決: wp-cron.php not found or unable to stat

[Apache][WP] 解決 error_log 中的 [error] [client 127.0.0.1] script ‘…/www/wp-cron.php’ not found or unable to stat 錯誤訊息

如果你一個 Apache web server 服務多個網站的話,而在 “主站” (寫在 …/apache/conf/httpd.conf 中的 DocumentRoot 那個即為主站) 的 error_log 檔案中要是看到上面這個訊息的話,那表示你在此 Apache 服務的網站中至少有一個網站是用 WordPress 架設的,並且它不是上述的 “主站”,而它嘗試要跑 wp-cron.php 時發生了錯誤。
Continue reading “[Apache][WP] 解決: wp-cron.php not found or unable to stat”

[Apache][MySQL] error_log: [crit] (70023)This function has not been implemented on this platform: DBD: driver for [DBDriver unset] not available

在 apache web server 的 …/apache/logs/error_log 檔案如果很大,並且一直重複看到以下錯誤訊息:

[crit] (70023)This function has not been implemented on this platform: DBD: driver for [DBDriver unset] not available
Continue reading “[Apache][MySQL] error_log: [crit] (70023)This function has not been implemented on this platform: DBD: driver for [DBDriver unset] not available”