免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5147 | 回复: 4
打印 上一主题 下一主题

请教详细的mini_httpd 的程序流程图 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-11-28 23:18 |只看该作者 |倒序浏览
请教mini_httpd的详细的流程图

论坛徽章:
0
2 [报告]
发表于 2007-11-29 12:08 |只看该作者
换了openssl-0.9.8g
编译报错:
[root@vrhel9 mini_httpd]# make
gcc -c -o mini_httpd.o -Wall -O2 -DUSE_SSL   mini_httpd.c -I. -I/usr/local/ssl/include
mini_httpd.c: In function `main':
mini_httpd.c:365: warning: unused variable `host_addr6_2'
mini_httpd.c: In function `match_ip':
mini_httpd.c:1377: warning: `tmp2' might be used uninitialized in this function
mini_httpd.c:1378: warning: `tmp4' might be used uninitialized in this function
mini_httpd.c: In function `do_cgi':
mini_httpd.c:2186: warning: unused variable `tmp'
/usr/include/bits/socket.h: At top level:
mini_httpd.c:245: warning: `listen6_fd2' defined but not used
mini_httpd.c:2806: warning: `virtual_file' defined but not used
gcc -c -o match.o -Wall -O2 -DUSE_SSL   match.c -I. -I/usr/local/ssl/include
gcc -c -o tdate_parse.o -Wall -O2 -DUSE_SSL   tdate_parse.c -I. -I/usr/local/ssl/include
gcc  -o mini_httpd mini_httpd.o match.o tdate_parse.o -Wall -O2 -DUSE_SSL   -static  -s -lcrypt -lssl -lcrypto -L/usr/local/ssl/lib
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x37): In function `dlfcn_load':
: undefined reference to `dlopen'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x9: In function `dlfcn_load':
: undefined reference to `dlclose'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0xc0): In function `dlfcn_load':
: undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x141): In function `dlfcn_bind_var':
: undefined reference to `dlsym'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x16c): In function `dlfcn_bind_var':
: undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x229): In function `dlfcn_bind_func':
: undefined reference to `dlsym'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x254): In function `dlfcn_bind_func':
: undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x50a): In function `dlfcn_unload':
: undefined reference to `dlclose'
collect2: ld returned 1 exit status
make: *** [mini_httpd] Error 1

论坛徽章:
0
3 [报告]
发表于 2007-11-29 12:13 |只看该作者
加了-ldl可以编译通过了,可打开测试页面还是下载cgi 可执行文件

论坛徽章:
0
4 [报告]
发表于 2007-11-29 12:59 |只看该作者
没用过mini_httpd,看看文档,配置编译选项时是不是需要打开cgi的支持选项。

论坛徽章:
0
5 [报告]
发表于 2007-11-29 17:41 |只看该作者
在命令行上用 -c 指定 CGI 的路径, 如:
mini_httpd -p 8080 -c "cgi-bin/*.cgi"

Good Luck!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP