I am trying to set up NewRelic on my Apache2/PHP server, and have it report different applications per vhost. To do this, the php value newrelic.appname
must be changed. It is defined by default in /etc/php.d/newrelic.ini
however to do per vhost reporting, it needs to be set specifically on that vhost, as described here: https://newrelic.com/docs/php/per-directory-settings
In my /etc/php.d/newrelic.ini
is set:
newrelic.appname="PHP Application;MySite.com;"
In my vhost I have the following configuration:
<Directory "/">
AllowOverride All
php_value newrelic.appname "MySite.com"
</Directory>
And it my .htaccess
I have:
php_value newrelic.appname 'MySite.com'
But looking at phpinfo()
served from a file in the same directory as the .htaccess
file I get:
Directive Name Local/Active Value Master/Default Value
-----------------------------------------------------------
newrelic.appname PHP Application PHP Application
Using FastCGI via spawn-fcgi.
Any other suggestions would be much appreciated.