• /
  • EnglishEspañol日本語한국어Português
  • 로그인지금 시작하기

Multiple accounts

You can configure New Relic to support multiple accounts per host. For example, you may be a service provider supporting multiple customers in a shared hosting environment.

Set per virtual host

Set a New Relic for each virtual host using newrelic.license.

For example, with Apache:

<VirtualHost 192.168.42.43>
ServerName www.myvhost1.com
DocumentRoot "/path/to/vhost1/"
...
<IfModule php5_module>
php_value newrelic.license "NEW RELIC LICENSE KEY 1"
</IfModule>
</VirtualHost>
<VirtualHost 192.168.123.45>
ServerName www.myvhost2.com
DocumentRoot "/path/to/vhost2/"
...
<IfModule php5_module>
php_value newrelic.license "NEW RELIC LICENSE KEY 2"
</IfModule>
</VirtualHost>

Set with the API

Use newrelic_set_appname() to change the account during the current transaction.

For example:

newrelic_set_appname("APP NAME", "NEW RELIC LICENSE KEY");

Set this as early in the transaction process as possible; otherwise the transaction may already be locked into a prior configuration.

Note: newrelic_start_transaction() can also be used. This is not typical usage.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.