Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

BattleMetalChris's avatar

Laravel 5 logging to /var/log/apache2 instead of Storage

Yes, I know v5 is an old version, I plan to update it.

When anything is written to the error log, it gets put in /var/log/apache2. This hasn't been a problem so far but now I want to look in the log programatically and Laravel doesn't have permission to read there. Everything I've read online says it should be logging to storage/logs but that folder is empty. Where can I find where the log is configured?

Or is it that there's an error when it tries to log to Storage, and so the error of the error is getting put in log/apache2?

0 likes
5 replies
gych's avatar

Which value do you have in config/app.php for 'log'

BattleMetalChris's avatar

In app.php It's pulling the LOG field from the .env file which is set to 'errorLog'

gych's avatar
gych
Best Answer
Level 29

Mode errorLog will store the logs in the server logs, try to use single or daily.

single mode is for a single log file, where all logs will be stored. daily mode is for log files per day, where the logs for each day will be stored in their own log file

1 like
gych's avatar

@BattleMetalChris No problem :) I'm glad it works now !

Please don't forget to close your thread by selecting the best answer.

Please or to participate in this conversation.