[{"data":1,"prerenderedAt":376},["ShallowReactive",2],{"navigation":3,"/docs/image-variations/fpm-apache":92,"/docs/image-variations/fpm-apache-surround":371},[4],{"title":5,"path":6,"stem":7,"children":8,"page":39},"Docs","/docs","docs",[9,25,40,60,76,84],{"title":10,"path":11,"stem":12,"children":13,"icon":24},"Getting Started","/docs/getting-started","docs/1.getting-started/1.index",[14,16,20],{"title":15,"path":11,"stem":12},"Introduction",{"title":17,"path":18,"stem":19},"Quick start","/docs/getting-started/quick-start","docs/1.getting-started/2.quick-start",{"title":21,"path":22,"stem":23},"Running from source","/docs/getting-started/running-from-source","docs/1.getting-started/3.running-from-source","i-lucide-rocket",{"title":26,"icon":27,"path":28,"stem":29,"children":30,"page":39},"Configuration","i-lucide-settings-2","/docs/configuration","docs/2.configuration",[31,35],{"title":32,"path":33,"stem":34},"Adding a real database","/docs/configuration/adding-databases","docs/2.configuration/1.adding-databases",{"title":36,"path":37,"stem":38},"Customizing the image","/docs/configuration/customizing-the-image","docs/2.configuration/2.customizing-the-image",false,{"title":41,"path":42,"stem":43,"children":44,"icon":59},"Image variations","/docs/image-variations","docs/3.image-variations/1.index",[45,47,51,55],{"title":46,"path":42,"stem":43},"Choosing a variation",{"title":48,"path":49,"stem":50},"FPM-NGINX","/docs/image-variations/fpm-nginx","docs/3.image-variations/2.fpm-nginx",{"title":52,"path":53,"stem":54},"FrankenPHP","/docs/image-variations/frankenphp","docs/3.image-variations/3.frankenphp",{"title":56,"path":57,"stem":58},"FPM-Apache","/docs/image-variations/fpm-apache","docs/3.image-variations/4.fpm-apache","i-lucide-layers",{"title":61,"path":62,"stem":63,"children":64,"icon":75},"Benchmarks & Methodology","/docs/benchmarks","docs/4.benchmarks/1.index",[65,67,71],{"title":66,"path":62,"stem":63},"Methodology",{"title":68,"path":69,"stem":70},"Reading your results","/docs/benchmarks/reading-your-results","docs/4.benchmarks/2.reading-your-results",{"title":72,"path":73,"stem":74},"Testing from your own machine","/docs/benchmarks/testing-from-your-own-machine","docs/4.benchmarks/3.testing-from-your-own-machine","i-lucide-flask-conical",{"title":77,"path":78,"stem":79,"children":80,"icon":83},"Community Results","/docs/community-results","docs/5.community-results/1.index",[81],{"title":82,"path":78,"stem":79},"Submitting your results","i-lucide-users",{"title":85,"path":86,"stem":87,"children":88,"icon":91},"FAQ","/docs/faq","docs/6.faq/1.index",[89],{"title":90,"path":86,"stem":87},"Frequently asked questions","i-lucide-circle-help",{"id":93,"title":56,"body":94,"description":364,"extension":365,"links":366,"meta":367,"navigation":319,"path":57,"redirect":366,"seo":368,"sitemap":369,"stem":58,"__hash__":370},"docs/docs/3.image-variations/4.fpm-apache.md",{"type":95,"value":96,"toc":358},"minimark",[97,109,114,121,138,150,154,204,208,215,337,343,347,354],[98,99,100,104,105,108],"p",{},[101,102,103],"code",{},"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 ",[106,107,48],"a",{"href":49}," uses with a different front end.",[110,111,113],"h2",{"id":112},"when-to-choose-it","When to choose it",[98,115,116,120],{},[117,118,119],"strong",{},"Apache is what you deploy."," This is the main reason. Benchmarking the stack you actually run beats benchmarking a faster one you don't.",[98,122,123,126,127,130,131,130,134,137],{},[117,124,125],{},"You depend on Apache features."," ",[101,128,129],{},".htaccess",", ",[101,132,133],{},"mod_rewrite",[101,135,136],{},"mod_security",", and the rest of the module ecosystem have no nginx equivalent you can drop in.",[139,140,141],"note",{},[98,142,143,144,146,147,149],{},"If you are not tied to Apache, ",[106,145,48],{"href":49}," or ",[106,148,52],{"href":53}," will usually serve a Laravel workload faster. serversideup/php makes the same recommendation. Pick Apache because you run Apache, not for throughput.",[110,151,153],{"id":152},"run-it","Run it",[155,156,162],"pre",{"className":157,"code":158,"filename":159,"language":160,"meta":161,"style":161},"language-bash shiki shiki-themes github-dark","docker run -p 80:8080 \\\n  -v benchkit-runs:/var/www/html/storage/app/runs \\\n  serversideup/benchkit-laravel:fpm-apache\n","Terminal","bash","",[101,163,164,187,198],{"__ignoreMap":161},[165,166,169,173,177,181,184],"span",{"class":167,"line":168},"line",1,[165,170,172],{"class":171},"svObZ","docker",[165,174,176],{"class":175},"sU2Wk"," run",[165,178,180],{"class":179},"sDLfK"," -p",[165,182,183],{"class":175}," 80:8080",[165,185,186],{"class":179}," \\\n",[165,188,190,193,196],{"class":167,"line":189},2,[165,191,192],{"class":179},"  -v",[165,194,195],{"class":175}," benchkit-runs:/var/www/html/storage/app/runs",[165,197,186],{"class":179},[165,199,201],{"class":167,"line":200},3,[165,202,203],{"class":175},"  serversideup/benchkit-laravel:fpm-apache\n",[110,205,207],{"id":206},"tune-the-pool-before-you-compare","Tune the pool before you compare",[98,209,210,211,214],{},"The PHP side is identical to FPM-NGINX, so the same ceiling applies: a request holds an FPM worker for its whole duration, and ",[101,212,213],{},"pm.max_children"," caps concurrency regardless of hardware.",[155,216,221],{"className":217,"code":218,"filename":219,"language":220,"meta":161,"style":161},"language-yaml shiki shiki-themes github-dark","services:\n  benchkit:\n    image: serversideup/benchkit-laravel:fpm-apache\n    ports:\n      - \"80:8080\"\n    environment:\n      PHP_FPM_PM_CONTROL: \"dynamic\"\n      PHP_FPM_PM_MAX_CHILDREN: \"20\"\n    volumes:\n      - benchkit-runs:/var/www/html/storage/app/runs\n\nvolumes:\n  benchkit-runs:\n","docker-compose.yml","yaml",[101,222,223,233,240,251,259,268,276,287,298,306,314,321,329],{"__ignoreMap":161},[165,224,225,229],{"class":167,"line":168},[165,226,228],{"class":227},"s4JwU","services",[165,230,232],{"class":231},"s95oV",":\n",[165,234,235,238],{"class":167,"line":189},[165,236,237],{"class":227},"  benchkit",[165,239,232],{"class":231},[165,241,242,245,248],{"class":167,"line":200},[165,243,244],{"class":227},"    image",[165,246,247],{"class":231},": ",[165,249,250],{"class":175},"serversideup/benchkit-laravel:fpm-apache\n",[165,252,254,257],{"class":167,"line":253},4,[165,255,256],{"class":227},"    ports",[165,258,232],{"class":231},[165,260,262,265],{"class":167,"line":261},5,[165,263,264],{"class":231},"      - ",[165,266,267],{"class":175},"\"80:8080\"\n",[165,269,271,274],{"class":167,"line":270},6,[165,272,273],{"class":227},"    environment",[165,275,232],{"class":231},[165,277,279,282,284],{"class":167,"line":278},7,[165,280,281],{"class":227},"      PHP_FPM_PM_CONTROL",[165,283,247],{"class":231},[165,285,286],{"class":175},"\"dynamic\"\n",[165,288,290,293,295],{"class":167,"line":289},8,[165,291,292],{"class":227},"      PHP_FPM_PM_MAX_CHILDREN",[165,294,247],{"class":231},[165,296,297],{"class":175},"\"20\"\n",[165,299,301,304],{"class":167,"line":300},9,[165,302,303],{"class":227},"    volumes",[165,305,232],{"class":231},[165,307,309,311],{"class":167,"line":308},10,[165,310,264],{"class":231},[165,312,313],{"class":175},"benchkit-runs:/var/www/html/storage/app/runs\n",[165,315,317],{"class":167,"line":316},11,[165,318,320],{"emptyLinePlaceholder":319},true,"\n",[165,322,324,327],{"class":167,"line":323},12,[165,325,326],{"class":227},"volumes",[165,328,232],{"class":231},[165,330,332,335],{"class":167,"line":331},13,[165,333,334],{"class":227},"  benchkit-runs",[165,336,232],{"class":231},[98,338,339,340,342],{},"BenchKit flags a load test that asked for more concurrency than the pool could serve. See ",[106,341,36],{"href":37},".",[110,344,346],{"id":345},"what-a-fair-comparison-looks-like","What a fair comparison looks like",[98,348,349,350,353],{},"Apache against nginx is a ",[117,351,352],{},"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.",[355,356,357],"style",{},"html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .s4JwU, html code.shiki .s4JwU{--shiki-default:#85E89D}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}",{"title":161,"searchDepth":189,"depth":189,"links":359},[360,361,362,363],{"id":112,"depth":189,"text":113},{"id":152,"depth":189,"text":153},{"id":206,"depth":189,"text":207},{"id":345,"depth":189,"text":346},"PHP-FPM behind Apache, for when Apache is what you run in production.","md",null,{},{"title":56,"description":364},{"loc":57},"KylbgDcc9BBzTkkivR-6_-4E312WdPtj_TRHMS3TNIc",[372,374],{"title":52,"path":53,"stem":54,"description":373,"children":-1},"Run the same application classic or in Octane worker mode, and measure the difference.",{"title":66,"path":62,"stem":63,"description":375,"children":-1},"What each stage measures and how a run is put together.",1786740096072]