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

コメントを残す

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

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)