当前位置: 技术问答>linux和unix
无法浏览 thttpd 的程序
来源: 互联网 发布时间:2016-08-26
本文导语: 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...
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
demo.cgi
#include
int main(){
//printf("Content-Type:text/plain;charset=us-asciinn");
//printf("Hello Worldnn");
return 0;
}
浏览时显示:
403 Forbidden
The requested URL '/cgi-bin/index.html' resolves to a file that is not world-readable.
--------------------------------------------------------------------------------
thttpd/2.25b 29dec2003
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
demo.cgi
#include
int main(){
//printf("Content-Type:text/plain;charset=us-asciinn");
//printf("Hello Worldnn");
return 0;
}
浏览时显示:
403 Forbidden
The requested URL '/cgi-bin/index.html' resolves to a file that is not world-readable.
--------------------------------------------------------------------------------
thttpd/2.25b 29dec2003
|
检查index.html文件的权限和拥有者。
|
cgi 程序能浏览吗?
另外,你用什么用户启动 thttpd 的?
另外,你用什么用户启动 thttpd 的?
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。