聚會時間公告: 因應COSCUP 2011, Kalug 8月份休會一次

四月 30, 2013

小惡魔AppleBOY
AppleBOY
小惡魔 - 電腦技術 - 工作筆記 - AppleBOY is about »

tag cloud

» Install Nginx + spdy module on Ubuntu or Debian

nginx-logonginx-logo

上一篇提到 nginx 1.4.0 釋出並支援 SPDY,教學環境是 CentOS,這次在 Ubuntu 環境編譯遇到

/usr/bin/ld: cannot find -lperl

找不到 perl library,解法可以透過 aptitude 安裝 libperl5.14,安裝好後,到 /usr/lib 底下找到 libperl.so.5.14.2,由於檔案命名關係,請用 ln 將檔案 link 成 libperl.so

$ ln -s libperl.so.5.14.2 libperl.so

接著可以正確編譯了,底下安裝相關套件

$ aptitude -y install libpcre3-dev libgd-dev libgd2-xpm-dev libgeoip-dev

四月 28, 2013

小惡魔AppleBOY
AppleBOY
小惡魔 - 電腦技術 - 工作筆記 - AppleBOY is about »

tag cloud

» nginx 1.4.0 釋出並支援 SPDY

nginx-logonginx-logo

很高興看到 Nginx Release 1.4.0 版本,此新版本開始支援 SPDY module,對於 SPDY 還不熟悉了解的,可以參考今年 2013 WebConf 講師 ihower 介紹的 A brief introduction to SPDY – 邁向 HTTP/2.0,要提升整個 Web Performance,可以將 SPDY 導入,對於使用 Apache 使用者,請參考 mod_spdy,如果是 Nginx 用戶,在 1.3.x 版本,可以直接用官方 patch,升級到 1.4.x 就不需要 patch 了,但 OS 是 UbuntuCentOS 系列是需要自行編譯,這次會筆記在 CentOS 下將 spdy 編譯進系統。

安裝方式

先看 Ngix 是否有支援 spdy,直接下 nginx -V 觀看

nginx version: nginx/1.1.19
TLS SNI support enabled
configure arguments: –prefix=/etc/nginx –conf-path=/etc/nginx/nginx.conf –erth=/var/lib/nginx/body –http-fastcgi-temp-path=/var/lib/nginx/fastcgi –http-lb/nginx/proxy –http-scgi-temp-path=/var/lib/nginx/scgi –http-uwsgi-temp-path==/var/run/nginx.pid –with-debug –with-http_addition_module –with-http_dav_moith-http_image_filter_module –with-http_realip_module –with-http_stub_status__xslt_module –with-ipv6 –with-sha1=/usr/include/openssl –with-md5=/usr/includ/buildd/nginx-1.1.19/debian/modules/nginx-auth-pam –add-module=/build/buildd/d/nginx-1.1.19/debian/modules/nginx-upstream-fair –add-module=/build/buildd/ng


看到上述結果,沒有發現 http_spdy_module 模組,代表並無編譯進去,底下安裝過程,是基於 CentOS 6.4 Release 環境。安裝前請先下載 Nginx 1.4.0openssl 1.0.1e 版本。

# generate makefile
cd /tmp/nginx-1.4.0 && ./configure \
    --prefix=/usr/share/nginx \
    --sbin-path=/usr/sbin/nginx \
    --conf-path=/etc/nginx/nginx.conf \
    --error-log-path=/var/log/nginx/error.log \
    --http-log-path=/var/log/nginx/access.log \
    --pid-path=/var/run/nginx.pid \
    --user=nginx \
    --group=nginx \
    --with-http_realip_module \
    --with-http_addition_module \
    --with-http_xslt_module \
    --with-http_image_filter_module \
    --with-http_geoip_module \
    --with-http_sub_module \
    --with-http_dav_module \
    --with-http_flv_module \
    --with-http_mp4_module \
    --with-http_gzip_static_module \
    --with-http_random_index_module \
    --with-http_secure_link_module \
    --with-http_degradation_module \
    --with-http_stub_status_module \
    --with-http_perl_module \
    --with-mail \
    --with-mail_ssl_module \
    --with-http_ssl_module \
    --with-http_spdy_module \
    --with-openssl=/tmp/openssl-1.0.1e
cd /tmp/nginx-1.4.0 && make && make install

比較需要注意的事,假如系統已經安裝好 nginx 版本,預設執行程式會在 /usr/sbin/nginx,所以編譯時,請務必指定此路徑蓋掉原有的執行檔,這樣系統還是可以透過 init.d 啟動或關閉 nginx。

啟動 spdy 模組

為了將 https 及 spdy 同時 listen 443 port,OpenSSL 務必支援 Next Protocol Negotiation,所以版本要 1.0.1 以上。在 nginx.conf 設定如下

server {
    listen 443 ssl spdy;

    ssl_certificate server.crt;
    ssl_certificate_key server.key;
    ...
}

偵測伺服器是否支援 spdy

經過安裝完成 Nginx with spdy module,要確定伺服器有無支援,可以透過 Firefox addon 或 Chrome extension,底下是 SPDY indicator 下載連結

* Firefox SPDY indicator
* Chrome SPDY indicator

要如何測試呢?打開 Chrome 瀏覽器,輸入 Google 網址,你會發現網址列多一個綠色勾勾,那就代表伺服器有支援 SPDY Module。

十一月 29, 2012

小惡魔AppleBOY
AppleBOY
小惡魔 - 電腦技術 - 工作筆記 - AppleBOY is about »

tag cloud

» Nginx 判斷檔案是否存在

如果你有在使用 CodeIgniter + Nginx + PHP-FPM 使用者,務必看到這篇 CLI problem nginx php-fpm,在使用 CLI 時候會有些問題,解決方式也非常簡單,只要在 index.php 裡面加上

$_SERVER['PATH_INFO'] = NULL;

當然這篇最主要不是講這個,而是最後我有提到一篇解法,在 Nginx 裡面如何設定 rewrite 功能,比較不同的是,現在不用在設定這麼複雜了,要判斷檔案是否存在,不要在使用下面方式

server {
  root /var/www/domain.com;
  location / {
    if (!-f $request_filename) {
      break;
    }
  }
}

而必須改成

location / {
    try_files $uri $uri/ /index.php;
}

請看 Check IF File Exists,看完之後可以拿掉很多設定,讓 Nginx 設定檔看起來更簡單容易。

參考: try_files

Related View

十一月 6, 2012
» 限制 phpMyAdmin 存取 IP on Debian 6

在架設 LAMP 環境時,剛入門 MySQL 的凍仁都會順手裝上 phpMyAdmin,來管理資料庫,但這是個壞習慣,尤其是對已經上線的機器而言!若沒做好防護,就會敞開大門讓怪客 (cracker) 有機可乘!不過我們可以透過只允許特定 IP 連線來達到防護效果,以下將分別列出 Apache 以及 Nginx 的設定。

1. 環境設定

  • 作業系統:Debian 6 stable (squeeze)。
  • phpMyAdmin 路徑:/usr/share/phpmyadmin。
  • 允許 IP:192.168.1.1。
  • 允許 IP 範圍:192.168.2.1 ~ 192.168.2.254。

2. 設定檔修改

2.1. Apache

[ jonny@squeeze ~ ]
$ sudo vi /etc/phpmyadmin/apache.conf [Enter]
Alias /phpmyadmin/  "/usr/share/phpmyadmin/"
Alias /phpMyAdmin/ "/usr/share/phpmyadmin/"
<Directory "/usr/share/phpmyadmin">
Options -Indexes FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Allow from 192.168.1.1
Allow from 192.168.2.0/24
ErrorDocument 403 ok
RewriteEngine On
</Directory>

# Windows 上的 AppServ 預設路徑為 "C:/AppServ/www/phpMyAdmin"。

2.2. Nginx

[ jonny@squeeze ~ ]
$ sudo vi /etc/nginx/nginx.conf [Enter]
server {
location /phpmyadmin {
allow 192.168.1.1
allow 192.168.2.0/24
deny all;
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
}

3. 重啟服務

設定檔修改後需重新啟動該服務才會生效。
[ jonny@squeeze ~ ]
# Apache.
$ sudo /etc/init.d/apache2 restart [Enter]

# Nginx.
$ sudo /etc/init.d/nginx restart [Enter]

相關連結:
phpMyAdmin.net

資料來源:
Apache 的 Order Allow, Deny 詳解 - IT客
HttpAccessModule - Nginx.org

十月 8, 2012

小惡魔AppleBOY
AppleBOY
小惡魔 - 電腦技術 - 工作筆記 - AppleBOY is about »

tag cloud

» PHP MVC Framework 搭配 Nginx + PHP-FPM 設定檔

Laravel PHP Framework

相信大家都知道 Nginx 搭配 PHP-FPM 用起來效能還不錯,這次來筆記如何設定 Nginx 去除 PHP MVC Framework 討厭的 index.php 字串,不管是 LaravelCodeIgniter 教學文件都是在 Apache 設定 .htaccess 來達成 Cleaner URL,Apache 最大好處支援 .htaccess,但是 Nginx 也有強大的效能,此篇紀錄如何設定 Nginx 達成 mod_rewrite 效果。

首先來看看 apache .htaccess 是如何設定:

<IfModule mod_rewrite.c>
     RewriteEngine on

     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteCond %{REQUEST_FILENAME} !-d

     RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

上面的意思就是代表如果該 URL 是不存在的檔案或者是目錄就全部導向 index.php,如果在 Ubuntu 底下可能會產生 Loop,請把 .htaccess 改成底下

Options +FollowSymLinks
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php [L]

接著 Nginx 是如何設定呢?打開虛擬主機設定檔 /etc/nginx/sites-available/xxxx,將底下設定寫入

server {
    listen       80;
    server_name  laravel.wuboy.twbbs.org;
    root         /usr/home/git/laravel/public;

    access_log /var/log/nginx/laravel_access.log;
    error_log /var/log/nginx/laravel_error.log;

    location / {
        index  index.php index.html index.htm;
    }

    if ($request_uri ~* index/?$)
    {
        rewrite ^/(.*)/index/?$ /$1 permanent;
    }

    # removes trailing slashes (prevents SEO duplicate content issues)
    if (!-d $request_filename)
    {
        rewrite ^/(.+)/$ /$1 permanent;
    }

    # removes access to "system" folder, also allows a "System.php" controller
    if ($request_uri ~* ^/system)
    {
        rewrite ^/(.*)$ /index.php?/$1 last;
        break;
    }

    # unless the request is for a valid file (image, js, css, etc.), send to bootstrap
    if (!-e $request_filename)
    {
        rewrite ^/(.*)$ /index.php?/$1 last;
        break;
    }

    # catch all
    error_page 404 /index.php;

    # use fastcgi for all php files
    location ~ \.php$
    {
        fastcgi_pass unix:/tmp/php-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include /usr/local/etc/nginx/fastcgi_params;
        fastcgi_param HTTPS off;
    }

    # deny access to apache .htaccess files
    location ~ /\.ht
    {
        deny all;
    }
}

基本上按照上面的設定,你就可以成功移除 index.php 字眼,底下來解釋此設定檔

if ($request_uri ~* index/?$)
{
    rewrite ^/(.*)/index/?$ /$1 permanent;
}

此設定會將 /controller/index 轉成 /controller,因為每一個 Controller 預設的 method 就是 index,所以我想也不用特別顯示在 URL 上面。permanent 所代表就是 301 轉向。

if (!-d $request_filename)
{
    rewrite ^/(.+)/$ /$1 permanent;
}

此設定會將 URL 最後的 Slash 給拿掉,防止 SEO 取得重複資訊。

if ($request_uri ~* ^/system)
{
    rewrite ^/(.*)$ /index.php?/$1 last;
    break;
}

此設定是禁止存取 system 目錄,此目錄是 CodeIgniter 核心目錄,那 Laravel 沒有此問題,因為你的虛擬主機一定會指向 public 目錄,所以也無法存取上層 Laravel 核心目錄

if (!-e $request_filename)
{
    rewrite ^/(.*)$ /index.php?/$1 last;
    break;
}

此設定來到 URL 最後判斷,如果 URL 連結並非是實體檔案,則全部導向 /index.php?/$1,也就完成了 Cleaner URL 動作,最下面設定了 PHP-FPM Socket Server,這邊就不多說了,設定檔給大家參考,如果有任何問題請留言。

Related View

五月 28, 2012

小惡魔AppleBOY
AppleBOY
小惡魔 - 電腦技術 - 工作筆記 - AppleBOY is about »

tag cloud

» 在 Fedora 或 Amazon Linux AMI 架設 Nginx + PHP FastCGI

799px-Amazon.com-Logo.svg

上一篇介紹如何在 Ubuntu 底下安裝 Nginx + PHP FastCGI,這次來紀錄如何安裝在 Fedora 系統,目前環境是使用 Amazon Linux AMI,如果有在玩 AWS EC2 或是 Fedora Linux 的話,對這 OS 就不會很陌生了。

安裝 Nginx

用 yum 升級系統所有套件,再安裝 Nginx + PHP 環境

$ yum update
$ yum install nginx php-cli php spawn-fcgi

將 Nginx 加入開機自動執行,並且啟動它

$ chkconfig --level 35 nginx on
$ service nginx start

設定 Nginx

Nginx 設定檔預設放在 /etc/nginx/nginx.conf,如果看過此設定檔你會發現跟 Ubuntu 安裝不同的地方在於這裡沒有 sites-availablesites-enabled 目錄,當然我們可以自行去設定

mkdir /etc/nginx/sites-available
mkdir /etc/nginx/sites-enabled

接著修改 /etc/nginx/nginx.conf 加入底下設定

# Load virtual host configuration files.
include /etc/nginx/sites-enabled/*;

如果覺得這步驟很麻煩的話,可以直接修改 /etc/nginx/conf.d/default.conf,這檔案就是 Nginx 預設的 Virtual Host 設定,如果要增加網站,就可以直接建立新檔案 /etc/nginx/conf.d/www.example.com.conf,接下來設定單一網站,設定檔內容如下

server {
    server_name www.example.com;
    listen 8090;
    access_log /var/log/nginx/example/logs/access.log;
    error_log /var/log/nginx/example/logs/error.log;
    root /home/www/appleboy;

    location / {
        index index.php index.html index.htm;
    }

    location ~ \.php$ {
        include /etc/nginx/fastcgi_params;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME /home/www/appleboy$fastcgi_script_name;
    }
}

存檔後,記得建立 logs 目錄,Nginx 不會自動幫忙建立

mkdir -p /var/log/nginx/example/logs/

如果您想跟 Ubuntu 一樣的建立 Virtual Host,請執行底下步驟

ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/example.com

最後重新啟動 Nginx

service nginx restart

建立 PHP Fast CGI 環境

我們透過 spawn-fcgi 來管理 CGI process,避免 PHP5-CGI 突然掛掉。首先建立 /usr/bin/php-fastcgi 檔案,內容如下

#!/bin/sh
/usr/bin/spawn-fcgi -P /var/run/php-cgi.pid -a 127.0.0.1 -p 9000 -C 15 -u nginx -g nginx -f /usr/bin/php-cgi

建立 /etc/rc.d/init.d/php-fastcgi 開機執行 php fastcgi

#!/bin/sh
#
# php-fastcgi - Use PHP as a FastCGI process via nginx.
#
# chkconfig: - 85 15
# description: Use PHP as a FastCGI process via nginx.
# processname: php-fastcgi
# pidfile: /var/run/php-cgi.pid
# modified: Bo-Yi Wu <appleboy.tw AT gmail.com>

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0

phpfastcgi="/usr/bin/php-fastcgi"
prog=$(basename php-cgi)

pidfile="/var/run/${prog}.pid"
lockfile="/var/lock/subsys/${prog}"
STOP_TIMEOUT="10"

start() {
    [ -x $phpfastcgi ] || exit 5
    echo -n $"Starting $prog: "
    daemon --pidfile=${pidfile} ${phpfastcgi}
    retval=$?
    echo
    [ $retval -eq 0 ] && touch ${lockfile}
    return $retval
}

stop() {
    echo -n $"Stopping ${prog}: "
    killproc -p ${pidfile} -d ${STOP_TIMEOUT} ${prog}
    retval=$?
    echo
    [ $retval -eq 0 ] && rm -rf ${lockfile} ${pidfile}
    return $retval
}

restart() {
    stop
    start
}

reload() {
    echo -n $"Reloading $prog: "
    killproc $prog -HUP
    RETVAL=$?
    echo
}

force_reload() {
    restart
}

case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    restart)
        restart
        ;;
    reload)
        reload
        ;;
    force-reload)
        force_reload
        ;;
    status)
        status -p ${pidfile} $prog
        ;;
    condrestart|try-restart)
        rh_status_q || exit 0
        ;;
    *)
        echo $"Usage: $0 {start|stop|status|restart|reload|force-reload}"
        exit 2
esac

更改 /etc/rc.d/init.d/php-fastcgi 檔案權限

chmod +x /etc/rc.d/init.d/php-fastcgi

加入開機自動執行

$ chkconfig --add php-fastcgi
$ chkconfig php-fastcgi on
$ /etc/init.d/php-fastcgi start

打開瀏覽器看有沒有正確看到 phpinfo();

Related View

五月 25, 2012

小惡魔AppleBOY
AppleBOY
小惡魔 - 電腦技術 - 工作筆記 - AppleBOY is about »

tag cloud

» 在 Ubuntu 10.10 (Maverick) 架設 Nginx + PHP FastCGI

logo-Ubuntu

今天來筆記如何在 Ubuntu 底下完整安裝 Nginx + PHP FastCGI,以及了解 Nginx 基本設定。我想大家都知道 Apache 是一個很好的 Web Server 伺服器,也常常用在個人網站,或者一般小型專案,網路上也有一堆懶人包,如 Appserv, Xampp,對於新手入門來說 Apache 是一個很好的選擇,但是您會發現用了 Apache 後,系統記憶體常常飆高 XD,載入太多額外不必要的模組,所以非常肥大,那這次就來嘗試另外一套 Web 伺服器 Nginx 吧。

安裝套件

Ubuntu 可以透過 apt-get 方式安裝

$ apt-get update
$ apt-get upgrade
$ apt-get install nginx php5-cli php5-cgi spawn-fcgi psmisc

PHP CGI binary 能自行執行在 Fast CGI Interface 上面,並不需要額外安裝任何程式。只需要安裝 php-cgi 套件 aptitude install php5-cgi,接著執行 php-cgi -b 127.0.0.1:9000 就完成了。你會發現 local 端用 PHP 跑起一個 FastCGI interface 服務,透過 Nginx 的 fastcgi_pass 127.0.0.1:9000; 就可以跟 FastCGI 做溝通。

開機自動執行 PHP FastCGI

建立 PHP FastCGI 開機啟動 Script,首先打開 /etc/init.d/php-fcgi (如果無此檔案,請用 touch 方式產生),將底下 shell script 程式碼放入

#!/bin/bash
BIND=127.0.0.1:9000
USER=www-data
PHP_FCGI_CHILDREN=15
PHP_FCGI_MAX_REQUESTS=1000

PHP_CGI=/usr/bin/php5-cgi
PHP_CGI_NAME=`basename $PHP_CGI`
PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND"
RETVAL=0

start() {
      echo -n "Starting PHP FastCGI: "
      start-stop-daemon --quiet --start --background --chuid "$USER" --exec /usr/bin/env -- $PHP_CGI_ARGS
      RETVAL=$?
      echo "$PHP_CGI_NAME."
}
stop() {
      echo -n "Stopping PHP FastCGI: "
      killall -q -w -u $USER $PHP_CGI
      RETVAL=$?
      echo "$PHP_CGI_NAME."
}

case "$1" in
    start)
      start
  ;;
    stop)
      stop
  ;;
    restart)
      stop
      start
  ;;
    *)
      echo "Usage: php-fcgi {start|stop|restart}"
      exit 1
  ;;
esac
exit $RETVAL

存檔後,請修改此檔案權限,讓其他使用者可以執行程式。

chmod +x /etc/init.d/php-fcgi

透過底下方式,可以隨時啟動或關閉 PHP FastCGI

# start the fast cgi
/etc/init.d/php-fcgi start
# stop the fast cgi
/etc/init.d/php-fcgi stop
# restart fast cgi
/etc/init.d/php-fcgi restart

加入開機自動執行

update-rc.d php-fcgi defaults

編輯 Nginx 設定檔

Nginx 設定檔目錄在 /etc/nginx/,我們打開設定檔 nginx.conf

user www-data;
worker_processes  1;

error_log  /var/log/nginx/error.log;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
    # multi_accept on;
}

http {
    include       /etc/nginx/mime.types;

    access_log  /var/log/nginx/access.log;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    tcp_nodelay        on;

    gzip  on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}

此檔案不需要更動,我們可以看到最後一行有 include /etc/nginx/sites-enabled/*,這就是 Nginx Virtual Host 設定檔位置,預設會有一個 default 設定,如果需要建立其它 domain,我們就可以複製此檔案即可。底下會帶大家如何設定 Nginx + PHP FastCGI,直接打開 default,加底下設定值寫到檔案即可

location ~ \.php {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    include /etc/nginx/fastcgi_params;
    keepalive_timeout 0;
    fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
}

注意看到 fastcgi_pass 就是用 TCP 方式跟 PHP FastCGI 溝通,另外網頁目錄也是需要設定

location / {
    root   /var/www;
    index  index.php index.html index.htm;
}

設定完成後,重新啟動 Nginx

/etc/init.d/nginx restart

打開 /var/www/phpinfo.php 裡面寫入

<?php
phpinfo();
?>

看到 PHP 設定值畫面就代表架設成功。另外可以用 /etc/init.d/nginx configtest 檢查 Nginx 設定檔是否正確,如果要新開虛擬網站,請透過底下方式建立

# 建立目錄
mkdir /var/www/www.example.com
# 建立設定檔
cp /etc/nginx/sites-available/default /etc/nginx/sites-available/example.com
# 連結
ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/example.com
# 重新啟動伺服器
/etc/init.d/php-fcgi start
/etc/init.d/nginx restart

出現 No input file specified.

請注意網站設定檔是否設定錯誤

fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;

上面請務必設定正確,根據不同的根目錄,請自行修改 /var/www 這部份

其他參考網站:
PHP FastCGI with nginx on Ubuntu
架設 Nginx + PHP FastCGI 於 Ubuntu Linux 10.04
Nginx and PHP-FastCGI on Ubuntu 10.10 (Maverick)
官方 Wiki: PHPFcgiExample (必看)
官方 Wiki: Configuration

Related View

A Feedjack powered Planet
A Django site.