I have a PHP environment in my ElasticBeanstalk application. I receive a HTTP 500 error at some point and I am unable to debug it as I don't see any log of it in the logs bundle. My environment is configured to stream logs to CloudWatch and still nothing about the 500 error.
I tried adding a configuration file to the .ebextensions
directory:
files:
"/opt/elasticbeanstalk/tasks/bundlelogs.d/php.conf":
mode: "000755"
owner: root
group: root
content: |
/var/log/php/*
/var/log/php-fpm/*
But still there is no php log file in the logs bundle. What can I do about this? Thanks.
IF you are using a php framework, most of them are configured to intercept and handle errors, so they don't show up in standard logs.
For Laravel, you would need to make sure you have logging enabled, and either set or use the default log location, and then add that location to your configuration.
See Where are logs located? for more information on logging.