官术网_书友最值得收藏!

  • Lighttpd
  • Andre Bogus
  • 217字
  • 2021-08-25 18:06:25

Access Logging

We can configure logging to include more or less information. By default, Lighttpd uses the Common Log Format (CLF) as used by most available HTTP servers with varying extensions. However, the access logging is completely configurable.

If we do not care about logging, or, we are really strapped for disk space (for example, on embedded systems) we can turn it off entirely by removing mod_accesslog from our server.modules (on embedded systems we would go one step further and remove mod_accesslog entirely). Otherwise, we can configure logging to strike a balance between space and use privacy requirements on one hand, and our interest in the data on the other hand.

The access.log file follows a format laid out in the accesslog.format configuration option. The contents of this option are included as plain text on each line, but only for entries starting with a percent sign. These entries are placeholders for information about the logged event. Here is a list of these placeholders:

The default for accesslog.format is "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" in compliance with the CLF. The other configuration options of mod_accesslog allow us to use a syslog daemon for logging or specifying an alternative file path for the access log:

# either
accesslog.use-syslog = "enable"
# or
accesslog.filename = "/var/log/lighttpd.log"
主站蜘蛛池模板: 东乡县| 辽阳市| 聂拉木县| 连州市| 长顺县| 广州市| 仙居县| 兴文县| 监利县| 凌海市| 饶平县| 三河市| 保山市| 宁化县| 丰宁| 始兴县| 宽城| 无棣县| 潼关县| 嘉兴市| 米脂县| 香河县| 四平市| 恩平市| 曲水县| 双牌县| 且末县| 南开区| 乌兰察布市| 从化市| 武胜县| 泸定县| 长寿区| 北流市| 建始县| 玉环县| 长子县| 盐池县| 双柏县| 双桥区| 宁南县|