uhttpd是openwrt系统默认集成的轻量级服务器,采用select机制对设备性能要求较低。
/usr/sbin/uhttpd -f -h /www -r wifibox -x /cgi-bin -l /slipt -L /usr/share/lua/wifibox/main.lua -t 60 -T 30 -k 20 -A 1 -n 3 -N 100 -R -p 0.0.0.0 80
这是一类智能路由器uhttpd的运行参数,其中—h指定的是网站的根目录,静态文件请求会在会以这个目录为根目录;-L指定了调用的lua主处理程序;-x指定了cgi运行程序;源文件中的运行参数描述如下,附件为utttpd完整源码
"Usage: %s -p [addr:]port [-h docroot]\n"
" -f Do not fork to background\n"
" -c file Configuration file, default is '/etc/httpd.conf'\n"
" -p [addr:]port Bind to specified address and port, multiple allowed\n"
#ifdef HAVE_TLS