lighty 的生活

lighty 开发者博客

Lighttpd 揭秘 - 第一部分

我们有时编写代码的速度快于编写文档的速度。这基本意味着有时一些小巧的亮点(功能)会被隐藏起来,不为大多数用户所知。

这次我们想重点介绍 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 时,解析后的配置输出将帮助您查看一切是否真的按计划进行。

lighttpd

请注意,我们不接受发布超过 3 个月的文章的评论! 此外,请使用我们的错误追踪器报告错误,并使用我们的 IRC 频道 #lighttpd@libera 进行聊天。

« lighttpd 1.4.1 lighttpd 揭秘 - 第二部分 »