Webserver Configuration

The following web servers are available:

run.config:
  engine: php
  engine.config:
    webserver: 'apache'

Apache

apache_version

Defines which version of Apache to use in your application. The following versions are available:

  • 2.2
  • 2.4
run.config:
  engine: php
  engine.config:
    apache_version: '2.2'

apache_document_root

The public root of your web application. For instance, if you like to house your app in /public for security or organizational purposes, you can specify that here. The default is the /.

run.config:
  engine: php
  engine.config:
    apache_document_root: public

apache_index_list

When a path is not specified in the url, these files are served in order in which they’re listed.

run.config:
  engine: php
  engine.config:
    apache_index_list:
      - index.php
      - index.html

apache_default_gateway

When a path is not specified in the url, this files is served. This is similar to apache_index_list except it only accepts a single argument.

run.config:
  engine: php
  engine.config:
    apache_default_gateway: 'index.php'

apache_php_interpreter

Specify which PHP interpreter you would like Apache to use.

  • fpm (default)
  • mod_php
run.config:
  engine: php
  engine.config:
    apache_php_interpreter: fpm

apache_modules

Specify which Apache modules to enable or disable. View the full list of available Apache Modules. By default, the following modules are loaded:

  • dir
  • env
  • expires
  • log_config
  • mime
  • rewrite
  • setenvif
  • deflate

The following modules are enabled when using fpm:

  • actions
  • alias
  • fastcgi
run.config:
  engine: php
  engine.config:
    apache_modules

apache_max_spares

Sets Apaches MaxSpareServers directive.

run.config:
  engine: php
  engine.config:
    apache_max_spares: 10

apache_max_clients

Sets Apache’s MaxClients directive. Note: This configuration must be less than or equal to the apache_server_limit.

run.config:
  engine: php
  engine.config:
    apache_max_clients: 128

apache_server_limit

Sets Apaches ServerLimit directive. Note: This configuration must be greater than or equal to the apache_max_clients.

run.config:
  engine: php
  engine.config:
    apache_server_limit: 128

apache_max_requests

Sets Apache’s MaxRequestsPerChild directive.

run.config:
  engine: php
  engine.config:
    apache_max_requests: 10000

apache_static_expire

Adds far future expires to your header, setting the number of seconds static assets are cached. By default, static asset caching is not enabled. We only recommend using this directive on apps whose static assets do not change often.

run.config:
  engine: php
  engine.config:
    apache_static_expire: 86400

apache_log_level

Sets Apache’s LogLevel directive.

run.config:
  engine: php
  engine.config:
    apache_log_level: warn

apache_access_log

Enables or disables the Apache Access log.

run.config:
  engine: php
  engine.config:
    apache_access_log: false

Nginx

nginx_document_root

The public root of your web application. For instance, if you like to house your app in /public for security or organizational purposes, you can specify that here. The default is the /.

Note: If both this setting and the global document_root are set, the nginx_document_root will take precedence.

run.config:
  engine: php
  engine.config:
    nginx_document_root: public

nginx_index_list

When a path is not specified in the url, these files are served in order in which they’re listed.

run.config:
  engine: php
  engine.config:
    nginx_index_list:
      - index.php
      - index.html

nginx_default_gateway

When a path is not specified in the url, this files is served. This is similar to nginx_index_list except it only accepts a single argument.

run.config:
  engine: php
  engine.config:
    nginx_default_gateway: 'index.php'

Builtin

builtin_document_root

The public root of your web application. For instance, if you like to house your app in /public for security or organizational purposes, you can specify that here. The default is the /.

Note: If both this setting and the global document_root are set, the builtin_document_root will take precedence.

run.config:
  engine: php
  engine.config:
    builtin_document_root: public

PHP-FPM

These settings only apply when using Nginx or when using Apache with fpm as the apache_php_interpreter.

php_fpm_events_mechanism

Sets events.mechanism setting in the php-fpm.conf which specifies the events mechanism FPM will use. More information is available in PHP’s documentation.

run.config:
  engine: php
  engine.config:
    php_fpm_events_mechanism: 'epoll'

php_fpm_max_children

Sets the maximum number of child processes that can be created by PHP.

run.config:
  engine: php
  engine.config:
    php_fpm_max_children: 20

php_fpm_max_spare_servers

The desired maximum number of idle server processes.

run.config:
  engine: php
  engine.config:
    php_fpm_max_spare_servers: 1

php_fpm_max_requests

Sets the number of requests each child process should execute before respawning. This can be useful to work around memory leaks in 3rd party libraries.

run.config:
  engine: php
  engine.config:
    php_fpm_max_requests: 128