我们有时编写代码的速度快于编写文档的速度。这基本意味着有时一些小巧的亮点(功能)会被隐藏起来,不为大多数用户所知。
这次我们想重点介绍 lighttpd 1.4.0 及更高版本中新的命令行选项。
$ lighttpd -h lighttpd-1.4.1 (ssl) (Aug 23 2005 16:37:21) - a light and fast webserver usage: -f <name> filename of the config-file -p print the parsed config-file in internal form, and exit -t test the config-file, and exit -D don't go to background (default: go to background) -6 use IPv6 -v show version -h show this help
新选项是 -p
和 -t
。它们将帮助您在启动 lighttpd 并使用新配置之前,检查一切是否正常。
$ lighttpd -t -f ./lighttpd.conf Syntax OK
特别是当您开始使用 lighttpd 1.4.0 的新特性,例如 includes 和 expressions 时,解析后的配置输出将帮助您查看一切是否真的按计划进行。