18

I have created a simply vhost on Lighttpd web server and put these lines on the .conf file.

server.errorlog                = "/var/log/lighttpd/error.log"
accesslog.filename             = "/var/log/lighttpd/access.log"

I have read error.log and I found this:

2011-04-22 00:36:58: (server.c.954) WARNING: unknown config-key: accesslog.filename (ignored)

How is it possible? accesslog.filename exists, it's an option of the server.

I found it on their website: http://redmine.lighttpd.net/wiki/lighttpd/Docs:ConfigurationOptions

What can I do?

mattdm
  • 39,535
  • 18
  • 99
  • 133

2 Answers2

20

The option accesslog.filename is for the mod_accesslog module, so you need to load that module.

server.modules += ( "mod_accesslog" )
Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
0

If you encounter this issue for Lighttpd on your router (with Entware packages) check that this module was installed at all.

1) connect to your router via ssh and than execute the command:

opkg list-installed

2) should be line with "lighttpd-mod-accesslog - 1.4.xx". If it is not installed, install it:

opkg install lighttpd-mod-accesslog

3) adjust (change) your lighttpd.conf file with adding this module and config-key:

server.modules = (
"mod_redirect",
...
"mod_accesslog",
)

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

4) restart Lighttpd:

/opt/etc/init.d/S80lighttpd restart

These steps helped me. Also I created access.log file before config manipulation

hotenov
  • 101
  • 1