I have a PHP script that is used to authenticate Apache web users against a database. The script is called by a DefineExternalAuth directive in the VirtualHost configuration:
DefineExternalAuth phpauth pipe /webapproot/appauth.php
The script works fine, and returns 0 or 1 as appropriate - the good guys get in and the bad guys don't. What I can't work out is where any output from the authentication script is logged.
This is a Ubuntu 16.04 server running Apache 2.4.18
In the PHP code there are echo statements to give some detail about what is happening - the users are checked against a database so there are several possible ways that the check could fail and the script will echo messages about why the check has failed. When I test the script from a command line, the echo statements are printed on stdout. I can demonstrate that by piping to /dev/null
appauth.php > /dev/null ; echo $?
and typing a username and password in the terminal. It quietly returns 0 or 1 depending on whether the username and password match a database record.
So when the script is called from within Apache, presumably the output on stdout is captured somewhere, but I can't see where. It doesn't appear in /var/log/syslog or /var/log/apache/error.log or any of the log files defined for this VirtualHost
Is there something I need to add to the configuration to see it?