在启动脚本合适位置添加:
httpd -h /usr/app/www/
即开始httpd服务,并定位到/usr/app/www/
注:busybox已支持httpd命令,所以直接用即可。
busybox中httpd用法
httpd
-
httpd [-ifv[v]] [-c CONFFILE] [-p [IP:]PORT] [-u USER[:GRP]] [-r REALM] [-h HOME] or httpd -d/-e/-m STRING
Listen for incoming HTTP requests
Options:
-i Inetd mode -f Do not daemonize -v[v] Verbose -c FILE Configuration file (default httpd.conf) -p [IP:]PORT Bind to ip:port (default *:80) -u USER[:GRP] Set uid/gid after binding to port -r REALM Authentication Realm for Basic Authentication -h HOME Home directory (default .) -m STRING MD5 crypt STRING -e STRING HTML encode STRING -d STRING URL decode STRING