Image variations

FPM-Apache

PHP-FPM behind Apache, for when Apache is what you run in production.

fpm-apache runs PHP-FPM behind Apache. Apache takes the request, serves static files itself, and hands anything PHP to PHP-FPM over FastCGI. Both processes run in the same container under S6 Overlay, the same arrangement FPM-NGINX uses with a different front end.

When to choose it

Apache is what you deploy. This is the main reason. Benchmarking the stack you actually run beats benchmarking a faster one you don't.

You depend on Apache features. .htaccess, mod_rewrite, mod_security, and the rest of the module ecosystem have no nginx equivalent you can drop in.

If you are not tied to Apache, FPM-NGINX or FrankenPHP will usually serve a Laravel workload faster. serversideup/php makes the same recommendation. Pick Apache because you run Apache, not for throughput.

Run it

Terminal
docker run -p 80:8080 \
  -v benchkit-runs:/var/www/html/storage/app/runs \
  serversideup/benchkit-laravel:fpm-apache

Tune the pool before you compare

The PHP side is identical to FPM-NGINX, so the same ceiling applies: a request holds an FPM worker for its whole duration, and pm.max_children caps concurrency regardless of hardware.

docker-compose.yml
services:
  benchkit:
    image: serversideup/benchkit-laravel:fpm-apache
    ports:
      - "80:8080"
    environment:
      PHP_FPM_PM_CONTROL: "dynamic"
      PHP_FPM_PM_MAX_CHILDREN: "20"
    volumes:
      - benchkit-runs:/var/www/html/storage/app/runs

volumes:
  benchkit-runs:

BenchKit flags a load test that asked for more concurrency than the pool could serve. See Customizing the image.

What a fair comparison looks like

Apache against nginx is a front end comparison, since PHP-FPM is doing identical work on both sides. Give both the same pool settings and run them on the same machine. What is left is how each server handles connections, which is the only thing that differs.