webdevops/php plus Apache. Apache serves /app and passes PHP requests to PHP-FPM in the same container.
8.2, 8.3, 8.4, 8.5 (Debian 12) and 8.2-alpine, 8.3-alpine, 8.4-alpine, 8.5-alpine, for both php-apache and php-apache-dev.
services:
app:
image: webdevops/php-apache:8.5
ports:
- "8080:80"
environment:
WEB_DOCUMENT_ROOT: /app/public
volumes:
- ./:/appPorts: 80 (HTTP) and 443 (HTTPS). HTTPS uses a self-signed certificate for *.vm that ships with the image; it expired on 2025-05-01. To use your own certificate, see Configuration files.
Started by default: apache, php-fpm, cron, syslog. The -dev variant also starts postfix and ssh.
- Web server settings: Web server.
WEB_DOCUMENT_ROOT,WEB_DOCUMENT_INDEX,WEB_ALIAS_DOMAINandWEB_PHP_TIMEOUTapply to Apache. Apache's own index files (for exampleindex.htmland, on Debian,index.php) take precedence overWEB_DOCUMENT_INDEX. - PHP and PHP-FPM settings: see
webdevops/phpand Environment variables. - Scripts and hooks: Customization. Apache's hook directory is
/opt/docker/bin/service.d/httpd.d.
php-apache-dev is built on php-apache and changes the following:
- Xdebug is loaded by default, as in
php-dev;PHP_DEBUGGERswitches to Blackfire or turns both off. To connect your IDE, see Xdebug with an IDE. opcache.revalidate_freqis0.- Postfix and an SSH server are started. Postfix sends mail to real recipients unless you set a relay host, see Mail. Unlike
php-dev, no passwords are set, so nobody can log in over SSH; usedocker compose execinstead, see Known issues. - Files matching
WEB_NO_CACHE_PATTERN(CSS, JavaScript, images, JSON, XML by default) are served withoutETag.