I have a server that host mutliple domains having multiple PHP version as FCGId (run as virtual server owner). I am require to install new relic with infrastructure agent and php agent in it.
All went good, but i am not able to change PHP Application name per domain and i don’t why its not working. I can see there is /home/mydomain/etc/php.ini per domain and i added newrelic.appname = "mydomain.com.au" but is not working.
Any help will be much appreciated,
The following is from that URL. This would be good advice to follow even for seeking assistance on the Virtualmin forums:
If your system meets New Relic’s compatibility requirements but your installation is unsuccessful, gather the following information:
*Exact steps you tried
*Results, including success or failure messages
*Your operating system and version (for example, Ubuntu Linux version 12.04 64-bit)
*Your hosting service provider and subscription level
Are your PHP installations listed as PHP-FPM in the Dashboard/Servers Status section?
If so try this: Make sure the correct host is active in Virtualmin and from the menu select Services/PHP-FPM Configuration, then Edit Configuration Manually to edit the PHP-FPM pool file. Add the php_value at the bottom of that file. Then back to the Servers Status dashboard section and restart the PHP-FPM service for the version you’re working with. Restart Apache too.
I wish I had this option in my servers. There is one server with FPM (run as virtual server owner) option in Website Options but other 3 don’t have this. And also I am using this option if that’s what you are asking as PHP-FPM. There is no PHP-FPM in Dashboard/Server status as well.
All my servers are using FCGId and I am so confused that php_value is not changing even if I change it in apache conf or php.ini of my apache home directory of domain.
Thanks for your replies and great effort. I really appreciate it.
As you can see the screenshot of phpinfo(); of my server, newrelic.ini is located in /etc/php5/cgi/conf.d as /etc/php5/cgi/conf.d/20-newrelic.ini file. I have renamed it to 20-newrelic.ini instead of just newrelic.ini file just like other files were. And yes, it has its own ini file but it is for global and has default appname as “PHP Application”. What i wanted to have was custom name per domain.
There is already a php.ini file per domain in virtualmin domain setup in /home/domain.com/etc/php.ini and i tried to add newrelic.appname = "domain.com" there, was no luck. I don’t know if i should create another php.ini file in public directory of the domain i.e. /home/domain.com/public_html/php.ini or should i add php_value newrelic.appname "domain.com" in .htaccess of public_html folder.
Also, maybe should i remove 20-newrelic.ini file from getting included in gobal folders and copy this filer per domain php.ini file like copying content of 20-newrelic.ini to /home/domain.com/etc/php.ini such as following when mutliple domain:
copy content of 20-newrelic.ini to /home/domain1.com/etc/php.ini
copy content of 20-newrelic.ini to /home/domain2.com/etc/php.ini
copy content of 20-newrelic.ini to /home/domain3.com/etc/php.ini
and delete 20-newrelic.ini file from global folder i.e. /etc/php5/cgi/conf.d/20-newrelic.ini.
Sorry, just i am just thinking and writing my opinion. I haven’t tested this. I will try these above today sometime and let you guys know.