Abstract base image for a PHP application server for Apache w/ PHP-FPM
A base image for outrigger/docker-apache-php. Includes Apache and default VirtualHost configured with php-fpm proxy. Based on outrigger/servicebase
Does not include the PHP runtime. Extends this to add your own, or use outrigger/apache-php.
For more documentation on how Outrigger images are constructed and how to work with them, please see the documentation.
- Socket: 0.0.0.0:80
- Server Name: localhost
- PHP-FPM proxy: fcgi://localhost:9001
- Docroot: /var/www/html (configurable, see below)
Apache error and access logs are written to /var/log/httpd
.
By choosing to set the PHP_XDEBUG environment variable to "true"
, you may
enable Xdebug support. For details of the Xdebug configuration see the
configuration template.
The specific Xdebug settings are not configurable without overriding the Xdebug template but should serve most use cases.
For more on using Xdebug with PHPStorm, see the detailed Outrigger tutorial.
Outrigger images use Environment Variables and confd to "templatize" a number of Docker environment configurations. These templates are processed on startup with environment variables passed in via the docker run command-line or via your docker-compose manifest file. Here are the "tunable" configurations offered by this image.
DOCROOT
: [/var/www/html
] Apache document root.PHP_MAX_EXECUTION_TIME
: [60
] PHPmax_execution_time
value.PHP_MAX_CHILDREN
: [5
] Apache process managerpm.max_children
value.PHP_MEMORY_LIMIT
: [256m
] PHPmemory_limit
value.PHP_OPCACHE_MEMORY
: [192
] PHPopcache.memory_consumption
value.PHP_POST_MAX_SIZE
: [12M
] PHPpost_max_size
value.PHP_TIMEZONE
: [UTC
] PHPdate.timezone
value.PHP_UPLOAD_MAX_FILESIZE
: [10M
] PHPupload_max_filesize
value.PHP_XDEBUG
: ["false"
|"true"
] A string literal to enable PHP Xdebug. Defaults to"false"
.PHP_XHPROF
: ["false"
|"true"
] A string literal to enable PHP xhprof. Sets thexhprof.output_dir
directive to /tmp when enabled. Only usable on PHP versions less than PHP 7. Defaults to"false"
.PHP_YAML
: ["false"
|"true"
] A string literal to enable PHP YAML extension. Defaults to"false"
.PROXY_TIMEOUT
: [120
] ApacheProxySet timeout
value for the php-fpm proxy.PHPFPM_START_SERVERS
: [5
]Start Servers
The number of child processes created on startup.PHPFPM_MIN_SPARE_SERVERS
: [5
]Min Spare Servers
The desired minimum number of idle server processes.PHPFPM_MAX_SPARE_SERVERS
: [35
]Max Spare Servers
The desired maximum number of idle server processes.PHPFPM_MAX_REQUESTS
: [200
]Max Request
The number of requests each child process should execute before respawning.
Please email outrigger@phase2technology.com with security concerns.