Bitnami is a application automation tool which can install and setup many popular applications like Wordpress and Drupal from scratch, including PHP and Apache. AWS even uses it to automatically setup instances with Wordpress for you.
To do this, Bitnami has a custom build of PHP it uses with all the required modules for your selected application. This custom build causes issues for our normal install method.
Bitnami builds PHP without –with-config-file-scan-dir so there is no “Scan this dir for additional .ini files” setting. We rely on this to place our newrelic.ini which tells PHP to load New Relic as well as defines things like your appname. This means that a Bitnami system will not load New Relic because it does not load the newrelic.ini.
This means we need to do a manual install of the agent by copying the newrelic.so to the appropriate PHP extension_dir and copy the contents of a newrelic.ini to the loaded php.ini
How to fix it
Download the latest PHP Agent for Linux from here: http://download.newrelic.com/php_agent/release/
Create a phpinfo() page. This will tell us the locations of the files we need.
In your phpinfo() page, locate the Loaded Configuration File setting. This will be something like /opt/drupal-8.6.1-0/php/etc/php.ini
Copy the contents of a newrelic.ini to the end of the above php.ini. Be sure to add your chosen newrelic.appname and license key
In your phpinfo() page, locate the PHP Extension build number, something like 20160303, and the extension_dir, something like /opt/drupal-8.6.1-0/php/lib/php/extensions and the Thread Safety value.
From the agent install files in ./agent/x64/ , find the newrelic-XXXXXXXX.so if Thread Safety is disabled or newrelic-XXXXXXXX-zts.so if it is enabled where the number matches your build number from the previous step. Copy it to the extension_dir and rename it newrelic.so
Restart bitnami using /etc/init.d/bitnami restart or the bitnami control script.