Skip to main content

Configure the PHP agent

The standard configuration for all agents uses this order of precedence.

You may use a YAML configuration file or environment variables to configure the agent when running your application:

  • You can use environment variables to configure your build

  • You can create your own YAML configuration file or use this YAML template that contains all valid properties for the PHP agent

Tip

Use the Contrast agent configuration editor to create or upload a YAML configuration file, validate YAML and get setting recommendations.

PHP YAML template

Use this template to configure the PHP agent using a YAML configuration file. (Learn more about YAML configuration.)

Place your YAML file in the default location: /etc/contrast/php/contrast_security.yaml or /etc/contrast/contrast_security.yaml.

https://docs.contrastsecurity.com/common-agent-config/php_contrast_security.yaml