无法浏览 thttpd 的程序
zzxap 2010-05-10 04:43:19 1. 下载编译 thttpd,
tar –xzpvf thttpd-2.25b.tar.gz
./configure
make
make install
2. 启动: ./thttpd -d . -c "cgi-bin/**"
3. 做一个 CGI 程序放在 cgi-bin 目录, 如 demo.cgi
4. 浏览器输入地址测试: http://127.0.0.1/cgi-bin/index.html
index.html
<FORM ACTION= "hellow.cgi ">
<INPUT TYPE= "SUBMIT " VALUE= "OK ">
</FORM>
demo.cgi
#include <stdio.h>
int main(){
//printf("Content-Type:text/plain;charset=us-ascii\n\n");
//printf("Hello World\n\n");
return 0;
}
浏览时显示:
403 Forbidden
The requested URL '/cgi-bin/index.html' resolves to a file that is not world-readable.
--------------------------------------------------------------------------------
thttpd/2.25b 29dec2003