I serve static files with Lighttpd and on every request I would like to log the MAC address of the client. For this I have been trying to use the mod_accesslog
with a pipe logger, like this on the lighttpd.conf
:
accesslog.filename = '|/path/to/python/script.py'
I pretend to execute the script that gets the MAC address and then write to a log.
Currently I'm getting a Lighttpd error:
2018-05-17 21:37:22: (mod_accesslog.c.180) writing access log entry failed: |/path/to/python/script.py Broken pipe
And the logging directory (which contains the python script) has the following permissions:
drwxrwsr-x 2 root www-data 4096 May 17 21:36 log
Also, if anyone knows, what is the format in which the parameters are passed to the (python) script? In case what I'm trying to do is possible.