Apache, NGINX and PHP-FPM Gateway Timeout

Hello.

I think the best way for me to answer this question is to manually build a server, gain some knowledge and see how all the components need to be setup to communicate with each other.
However at the moment I’m hoping someone can give me a quick answer.

I’m using Hestia with the webserver setup as Apache + NGINX + PHP-FPM

Some of the PHP sites show a gateway timeout.

Previously (and a long time ago), I’ve only had to worry about Apache and just made changes using .htaccess.

Is anyone able to tell me how Apache, NGINX and PHP-FPM all relate to each other?

I changed the max_execution_time in PHP but it didn’t make any difference. Then using Google I started seeing a lot of “fixes” that might cause a gateway error.

Is anyone able to point me in the right direction to resolve this problem on a server setup with Hestia CP?

Thanks!

First one I’d try is the default /etc/apache2/apache2.conf value

# Global configuration
PidFile ${APACHE_PID_FILE}
Timeout 30

There are other places you can adjust, but this one is an easy first port of call. Helps if you count the seconds before it times out, so you can tell if altering this value changes things.

I’ve found this one fixed an update problem for nextcloud

1 Like

Okay! Now I’ll go work out the rest.

That worked and wasn’t on any of the articles I’d looked at!

You’re a lifesaver. Thank you!