web

所属分类:WEB开发
开发工具:Unix_Linux
文件大小:2139KB
下载次数:8
上传日期:2016-05-17 20:55:02
上 传 者儿子叫程序员
说明:  自己用c写的cgi操作。 方便自己开发 代码浅显易懂。
(I used to write c cgi operations. To facilitate their development Code is easy to understand.)

文件列表:
web\blank.html (508, 2008-11-02)
web\camera.html (1056, 2008-11-02)
web\cert.pem (1925, 2012-12-05)
web\cgi-bin\getAuth.c (1865, 2016-05-15)
web\cgi-bin\getAuth.c.bak (760, 2016-05-15)
web\cgi-bin\land.c (1489, 2016-05-15)
web\cgi-bin\land.c.bak (1455, 2008-11-08)
web\cgi-bin\land.cgi (9018, 2008-11-08)
web\cgi-bin\logoin.c (994, 2008-11-06)
web\cgi-bin\Makefile (213, 2012-12-10)
web\cgi-bin\mylogin.c (1107, 2016-05-15)
web\cgi-bin\postAuth.c (538, 2012-12-02)
web\cgi-bin\setting (15021, 2008-11-08)
web\cgi-bin\setting.c (9842, 2016-05-15)
web\cgi-bin\setting.c.bak (9814, 2016-05-15)
web\cgi-bin\status (13584, 2008-11-08)
web\cgi-bin\status.c (9048, 2016-05-15)
web\config.ini (350, 2016-05-14)
web\config.ini.bak (353, 2012-12-11)
web\daemon_init.c (368, 2012-12-10)
web\doc\back.c (15304, 2012-12-06)
web\doc\config.ini (257, 2012-12-03)
web\doc\dir\back\cert.csr (802, 2012-12-05)
web\doc\dir\back\cert.pem (1038, 2012-12-05)
web\doc\dir\back\key.pem (887, 2012-12-05)
web\doc\dir\back\privkey.pem (1041, 2012-12-05)
web\doc\dir\back\shadow (1477, 2012-12-04)
web\doc\dir\back_main.c (16514, 2012-12-12)
web\doc\dir\DirAuth.html (225, 2012-12-04)
web\doc\dir\DirGet.html (210, 2012-12-02)
web\doc\dir\file.png (1630, 2012-12-04)
web\doc\dir\main.c (11139, 2012-12-04)
web\doc\dir.png (1470, 2012-12-03)
web\doc\DirAuth.html (225, 2012-12-04)
web\doc\fifo.png (1573, 2012-12-03)
web\doc\file.png (1630, 2012-12-03)
web\doc\getAuth.html (2695, 2012-12-04)
web\doc\home.html (3846, 2016-05-14)
web\doc\img\112.gif (1963, 2008-11-02)
web\doc\img\113.gif (1967, 2008-11-02)
... ...

Webd uses the GET/POST method to serve static content (text, HTML, GIF, and JPG ....files) out of ./ and to serve dynamic content by running CGI programs out of ./cgi-bin. webd provides following functions: 1.provide GET/POST method to view static content and run cgi script 2.provide HTTP and HTTPS connection 3.provide dircetory view function 4.provide some access control based by ip address 5.provide easy logging function To run Webd: Run "webd" on the server machine, e.g., "webd" Maybe you should type "./webd" if current directory is not in your $PATH There are several argument option: -d --daemon -> webd run in the background -p --port -> assigned http port -s --sslport -> assigned https port -l --log -> assigned log path -e --extent -> provide https function -h --help -> help -v --version -> some other informations So,you can also do this: webd -d -p 8888 -s 4444 -e If your port is less then 1024,you must have the root permission,or use the sudo command. Point your browser at webd: for example,http port is 8888,and https port is 4444 you can view following page: http: 127.0.0.1:8000 home page 127.0.0.1:8000/dir view dir -> you can point the file name to view file contents or point the directory name to view the directory content 127.0.0.1:8888/getAuth.html -> a GET method page,login with email and password, you will see you email and password content 127.0.0.1:8888/postAuth.html -> a POST method page,login with email and password, you will see you email and password content https: the same function as to http,just uri has a litter changes https://127.0.0.1:4444 https://127.0.0.1:4444/dir https://127.0.0.1:4444/getAuth.html https://127.0.0.1:4444/postAuth.html Files: cert.pem -> the https CA,use openssl to create, so you must accept the CA to continue cgi-bin -> cgi script directory getAuth.c -> the get method cgi script postAuth.c -> the post method cgi script Makefile -> cgi/bin/*.c Makefile config.ini -> configuration file daemon_init.c -> daemon process doc -> the web page root directory log.c -> provide logging main.c -> the main source file Makefile -> *.c Makefile parse_config.c -> read the config.ini parse.h -> the main head file parse_option.c -> parse the argv README -> it's me secure_access.c -> provide easy access control webserver.sh -> a shell script,to provide start/stop/restart/status the webd e.g. webserver.sh start/stop/restart/status wrap.c -> must functions wrap file wrap.h -> the wrap.c's head file Bugs: If openssl lib library isn't accessible in your computer,you should change the Makefile.For datail,you could see Makefile.

近期下载者

相关文件


收藏者