Php-fpm & apache

For 504 - gateway timeout

increase the proxy timeout time with following steps:

echo 'ProxyTimeout 3600' > /etc/httpd/conf.d/proxy_timeout.conf
systemctl restart httpd.service