Solution 1:
You can specify a custom location for your Apache error log in your virtual host configuration:
ErrorLog /path/to/error/log/error.log
After updating the configuration, restart Apache:
sudo systemctl restart apache2 # Debian/Ubuntu
# or
sudo systemctl restart httpd # CentOS/RHEL
✅ Result:
- All errors for that virtual host will now be logged to the specified file.
- You can monitor the file to debug issues with your site.