大したことないことなんだけど、一応メモとして。
- apache 2 のインストール
# apt-get install apache2 apache2-devel

- mod_python のダウンロード/インストール
# wget http://ftp.riken.jp/net/apache/httpd/modpython/mod_python-3.3.1.tgz # tar zxvf mod_python-3.3.1.tgz # cd mod_python-3.3.1 # ./configure # make # make install

- apache 2 の設定: /etc/apache2/conf/httpd.conf を編集
LoadModule に
LoadModule python_module modules/mod_python.so
を追加。

適当なディレクティブに
AddHandler mod_python .py PythonHandler mod_python.publisher
を追加。

- apache 2 の起動
# /etc/init.d/apache2 start

- 確認
設定したディレクティブに test.py を置いて、内容は
def index():
    return 'a' * 20
とし、 これにアクセスして内容を確認。
# wget http://localhost/test.py
Posted by setomits at 11:15 | Comments: 0
Leave a comment
Required fields are marked with *
search
calendar
Feb 2012
SunMonTueWedThuFriSat
   1234
567891011
12131415161718
19202122232425
26272829   
archives
photos on flickr
www.flickr.com