Google Custom Search

2012/11/21

iptables block subdomains

今天發現有多達10個以上卻分屬不同ip區段的subdomain來砍站,懶得一個個加入iptables,上網查到一個妙法:

-m string --algo kmp --string "domain.com"
一次幫你擋掉整個subdomain,痛快!!

OSX 10.7 安裝 llvm-gcc 工具

為了編譯軟體,有需要安裝llvm-gcc, 上網找到方式,特別留下記錄,步驟如下:

  1. 安裝 Xcode (如果尚未安裝,前往 App Store 下載安裝)
  2. 點選 Xcode -> 偏好設定
  3. 點選 Downloads -> Command Line Tools 按下安裝
  4. 這樣就完成啦,可以在 /usr/bin/ 看到你想要的 llvm-gcc 囉

關於bluehost的資料庫限制

日前想要轉移一個網站到bluehost,沒想到轉到一半竟然被停止使用,經詢問才發現標榜一堆空間無限的背後其實資料庫空間是有限制的,原文如下:

Our database limits are 2G for the largest single database and 3G total for all of the databases on the account. If you need more usage we do offer a Pro account that allows for up to 5G total size in addition to a free dedicated IP address, an SSL certificate and a free domain registration .
就是單一資料庫最大2G,所有資料庫最多3G,超過就會發生效能問題然後就把你的網站停用,15日內沒有處理就把你的空間清掉了,要小心。

我的資料庫一個就5.6G的資料,所以轉移中就被停用了,暈倒。


2012/11/01

編譯apache 2.2.23遇到apr的錯誤解決方法

如果編譯httpd-2.2.23遇到下列錯誤:


byterange_filter.c:(.text+0x10ce): undefined reference to `apr_array_clear'

解決辦法很簡單,config時加上

--with-included-apr

就可以解決啦~


 我從apache 1.3就開始愛上他了,你呢 :)