The default Atatus PHP installation treats entire PHP deployment as a single PHP application with a single node. In case if you have multiple PHP applications running in the same Nginx or Apache server, you might want to monitor them as different PHP projects in Atatus. You can set separate app name for each and every PHP application running on the same server through a function call or an Apache/Nginx configuration.

1. Apache

There are two ways you can set application name in Apache. You can do them through:
  • httpd.conf file
  • .htaccess file
  • .user.ini file
httpd.conf file: You can set Atatus configuration either in httpd.conf file or one of its included files as follows:
Similar to app name setting, you can set all other Atatus agent configurations specific to the application. For example, if you want to disable Atatus agent for a specific application, then you can do the following:
The provided configuration will function solely with PHP 8. For PHP 7, you must utilize php7_module in place of php_module. In the case of PHP 5, substitute php5_module for php_module. To determine your module name among the loaded modules, you can use either httpd -M or apachectl -t -D DUMP_MODULES.
All string values should have double quotes. Any boolean value is either on or off.
.htaccess file: The .htaccess file must be in the top-level directory for that application. You can set the app name inside a .htaccess file. An example would be:
.user.ini file: In RedHat 9, CentOS 9 and above, php_value is deprecated, so please use the .user.ini in your app root directory.
Add below configuration in your .user.ini file

2. Nginx

There are two ways you can set the app name in Nginx. You can do them through:
  • Nginx config file
  • .user.ini file
Nginx config file: Below is a sample section from the Nginx config file, where you can pass app name value to FastCGI with respect to the location in Nginx.
If you are setting multiple PHP values, then you can do it as follows
.user.ini file: You should create a .user.ini file within your project home folder. A sample file content will be: