Sign inSign up

epicmorg/apache2

By epicmorg

•Updated about 5 hours ago

Apache2 (mpm_event) + PHP 5.3-8.5 via php-fpm over a unix socket, under supervisord

Image
1

10K+

epicmorg/apache2 repository overview

⁠epicmorg/apache2

Debian's Apache2 in front of our epicmorg/php⁠ images. No mod_php: PHP runs as php-fpm, Apache talks to it through mod_proxy_fcgi over the unix socket /run/php/php-fpm.sock, and supervisord keeps both processes running.

⁠What's inside

  • FROM epicmorg/php:<ver> - one tag per PHP branch, php5.3 ... php8.5. All PHP extensions, ionCube / phpBolt loaders and helper scripts (php-ext-enable, phpenmod, ...) of the PHP image are there.
  • Apache with mpm_event (prefork and worker disabled) and proxy_fcgi, ssl, rewrite, headers, ldap / authnz_ldap, lua and friends enabled; extra modules fcgid, xsendfile, encoding installed.
  • The PHP handler is server-wide (/etc/apache2/conf-enabled/php-fpm.conf), so every vhost gets PHP. Default site: localhost, document root /var/www/html.
  • php-fpm pool overrides in ${PHP_INI_DIR}/php-fpm.d/ (zz-apache.conf pins the socket).
  • Supervisor programs in /etc/supervisor/conf.d/{php-fpm,apache2}.conf - drop your own .conf next to them to run more processes.
  • HEALTHCHECK: GET http://127.0.0.1/php-fpm-ping through Apache - checks Apache and php-fpm at once.

⁠Tags

TagsDockerfile
php5.3php5.3⁠
php5.4php5.4⁠
php5.5php5.5⁠
php5.6php5.6⁠
php7.0php7.0⁠
php7.1php7.1⁠
php7.2php7.2⁠
php7.3php7.3⁠
php7.4php7.4⁠
php8.0php8.0⁠
php8.1php8.1⁠
php8.2php8.2⁠
php8.3php8.3⁠
php8.4php8.4⁠
php8.5php8.5⁠

Every tag is pushed to docker.io, quay.io and ghcr.io (epicmorg/apache2:<tag> on each) - same digest everywhere.

⁠Usage

Ports 80 and 443 are exposed; the container runs supervisord -n.

services:
  websites:
    image: epicmorg/apache2:php8.4
    restart: unless-stopped
    environment:
      - FIX_WWW_DATA=false   # true: chown -R www-data:www-data /var/www on start
    ports:
      - "80:80"
    volumes:
      - www:/var/www
    tmpfs:
      - /tmp
volumes:
  www:

Downstream images replace the default site:

FROM epicmorg/apache2:php8.4
COPY etc/apache2/sites-available/mysite.conf /etc/apache2/sites-available/mysite.conf
RUN a2dissite localhost && a2ensite mysite && apachectl configtest

Each tag directory has its own README with the exact layout: php8.4⁠.

Tag summary

Content type

Image

Digest

sha256:1ee98a391…

Size

961.9 MB

Last updated

about 5 hours ago

docker pull epicmorg/apache2:php8.1