What I found after a lot of digging around is that my nginx configuration was not taking into account the load balancer as a pool.
In my http block I needed to use upstream to identify the backend server addresses that are used for load balancing:
upstream mauticWeb {
least_conn;
server ${MAUTIC_WEB_URL}:9000;
}
and in my http
--> server
block wherever I needed to reach the backend php-fpm server I needed to use the upstream config.
server{
...
location ~ ^(.+\.php)(.*)$ {
...
fastcgi_keep_conn on;
fastcgi_pass mauticWeb;
...
}
...
}