Web-side logs generated during FreePBX HTTP requests do not reliably reach the container journal. NethHotel exposed the problem because its UI actions emit logs through the PHP web stack, but the bug affects Apache-served PHP error logging more generally.
Actual behavior:
- Triggering NethHotel actions from the web UI does not produce visible journal entries.
- PHP error_log messages emitted during HTTP requests are not visible in the freepbx container journal.
- The Apache vhost in 000-default.conf used file-style ErrorLog and CustomLog targets instead of container file descriptors.
Expected behavior:
- Web-side PHP error logs and Apache error logs should be visible in journald for the freepbx container.
- Access logs should continue to be emitted to stdout.
Why the old access.log symlink is not enough:
- NethHotel logs are not access log lines.
- The access log symlink only affects CustomLog.
- Application logs emitted via PHP during HTTP requests follow the Apache and PHP error log path, not the access log path.
Steps to reproduce:
- Start tailing journalctl CONTAINER_NAME=freepbx -f on a running instance.
- Trigger a NethHotel UI action such as check-in or check-out.
- Observe that no NethHotel log line appears in the journal.
- Emit a plain PHP error_log marker from a page served by Apache.
- Observe that the PHP marker is also missing from the journal.
Scope:
- Affected: Apache-served PHP error logging for HTTP requests, including NethHotel.
- Not necessarily affected: plain access logs, if access.log is still wired to stdout.
fix:
- Route the Apache vhost logs to /proc/self/fd/2 and /proc/self/fd/1 in 000-default.conf.
- Keep the NethHotel helper aligned with PHP logging in functions.inc.php.
- After that change, both Apache access lines and PHP error_log markers were visible in journald, which confirms that the bug was broader than NethHotel alone but narrower than all HTTP logging.
warning:
- this could trigger crowdsec
Web-side logs generated during FreePBX HTTP requests do not reliably reach the container journal. NethHotel exposed the problem because its UI actions emit logs through the PHP web stack, but the bug affects Apache-served PHP error logging more generally.
Actual behavior:
Expected behavior:
Why the old access.log symlink is not enough:
Steps to reproduce:
Scope:
fix:
warning: