Lighttpdのアクセスログを有効に

LighttpdでどのURLにアクセスしてもHTTPステータスコード503だけを返すようにしました.

ログを確認しようとすると, /var/log/lighttpd/ を見ると error.log はあるけど access.log がありません.

/etc/lighttpd/conf-available/ 以下を見ると, 10-accesslog.conf というそれらしいものが.

/etc/lighttpd/conf-available/10-accesslog.conf
server.modules += ( "mod_accesslog" )

accesslog.filename = "/var/log/lighttpd/access.log"

これを有効にしてみます.

$ sudo lighttpd-enable-mod accesslog
$ sudo systemctl lighttpd restart
$ sudo tail -f /var/log/lighttpd/access.log
  :

うまくアクセスログも保存されるようになりました :)

環境
$ dpkg-query -W lighttpd
lighttpd        1.4.59-1+deb11u1
$ lsb_release -dr
Description:    Raspbian GNU/Linux 11 (bullseye)
Release:        11
$ arch
armv7l
$ cat /proc/device-tree/model && echo
Raspberry Pi 3 Model B Rev 1.2

コメントを残す

メールアドレスが公開されることはありません。 ※ が付いている欄は必須項目です

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.