PHP App Server Layer Reference - AWS OpsWorks

PHP App Server Layer Reference


AWS OpsWorks Stacks is no longer accepting new customers. Existing customers will be able to use the OpsWorks console, API, CLI, and CloudFormation resources as normal until May 26, 2024, at which time they will be discontinued. To prepare for this transition, we recommend you transition your stacks to AWS Systems Manager as soon as possible. For more information, see AWS OpsWorks Stacks End of Life FAQs and Migrating your AWS OpsWorks Stacks applications to AWS Systems Manager Application Manager.


This layer is available only for Linux-based stacks.

The PHP App Server layer supports a PHP application server by using Apache2 with mod_php.

Short name: php-app

Compatibility: A PHP App Server layer is compatible with the following layers: custom, db-master, memcached, monitoring-master, and rails-app.

Open ports: A PHP App Server layer allows public access to ports 22 (SSH), 80 (HTTP), 443 (HTTPS), and all ports from load balancers.

Autoassign Elastic IP addresses: Off by default

Default EBS volume: No

Default security group: AWS-OpsWorks-PHP-App-Server

Setup recipes:

  • opsworks_initial_setup

  • ssh_host_keys

  • ssh_users

  • mysql::client

  • dependencies

  • ebs

  • opsworks_ganglia::client

  • mysql::client

  • dependencies

  • mod_php5_apache2

Configure recipes:

  • opsworks_ganglia::configure-client

  • ssh_users

  • agent_version

  • mod_php5_apache2::php

  • php::configure

Deploy recipes:

  • deploy::default

  • deploy::php

Undeploy recipes:

  • deploy::php-undeploy

Shutdown recipes:

  • opsworks_shutdown::default

  • apache2::stop


  • AWS OpsWorks Stacks uses the instance's package installer to install Apache2, mod_php and the associated log files to their default locations. For more information about installation, see Apache. For more information about logging, see Log Files.