thttpd - tiny/turbo/throttling HTTP server
thttpd とは
thttpd はシンプルで使用メモリが少なく高速に動作するように設計されたWebサーバです。 cgiなどを動かしたいけどapacheやlighttpdほどの高機能なwebサーバは必要ない場合に適している。 ちなみに最初の文字の"t" は tiny、turbo、throttling を表している。
ダウンロード
http://www.acme.com/software/thttpd/
http://www.acme.com/software/thttpd/thttpd-2.25b.tar.gz
thttppd インストール
$ ./configure --prefix=/usr/local/thttpd-225b $ make $ sudo make install $ sudo ln -s /usr/local/thttpd-225b /usr/local/thttpd
コンフィグファイル
/usr/local/thttpd/conf/thttpd.conf
user=nobody port=8000 dir=/usr/local/thttpd/www cgipat=*.cgi logfile=/var/log/thttpd.log pidfile=/var/run/thttpd.pid
thttpd FreeBSD用rc.d起動スクリプト
/usr/local/etc/rc.d/thttpd.sh
#!/bin/sh # # $FreeBSD: ports/www/thttpd/files/thttpd.sh.in,v 1.6 2012/01/14 08:57:18 dougb Exp $ # # PROVIDE: thttpd # REQUIRE: DAEMON # KEYWORD: shutdown # # Add the following line to /etc/rc.conf to enable thttpd: # # thttpd_enable="YES" # . /etc/rc.subr name=thttpd rcvar=thttpd_enable command=/usr/local/thttpd/sbin/thttpd thttpd_enable=${thttpd_enable:-"NO"} thttpd_flags=${thttpd_flags:-"-C /usr/local/thttpd/conf/thttpd.conf"} load_rc_config $name run_rc_command "$1"
自動起動設定
/etc/rc.conf
thttpd_enable="YES"
created: