
Now let’s add fastcgi_read_timeout variable inside our Nginx virtual host configuration: location ~. Try raising max_execution_time setting in php.ini file (CentOS path is /etc/php.ini): max_execution_time = 300īut, you should also change set request_terminate_timeout parameter (commented by default) at Then set the variable to the same value as max_execution_time: request_terminate_timeout = 300 So, check the nginx startup configuration file separately. Therefore, the suspicion is a permission issue. Here are the most common 504 error messages:ĥ04 Gateway Timeout error on Nginx + FastCGI (php-fpm)įor Nginx + FastCGI (php-fpm), you should try to tweak nginx configuration in this way: But you can use the sudo nginx command to start without using sudo to report no permissions.


How you might see the 504 Gateway Timeout errorĭifferent websites may customize the 504 gateway timeout error message. The first is to call NGINX again with the -s command line parameter.
MAC RESTART NGINX INSTALL
To fix 504 Gateway Time-out, you will have to figure out what configuration are you using. There are two ways to control NGINX once it’s already running. nginx Homebrew Formulae nginx Install command: brew install nginx HTTP (S) server and reverse proxy, and IMAP/POP3 proxy server License: BSD-2-Clause Formula JSON API: /api/formula/nginx.json Formula code: nginx. Create a launchd plist file and use launchctl command to load it. You can use launchd or launchctl to set up Nginx as a service so that it starts automatically on boot. Press Enter and then type your Mac’s password when prompted. By default, Nginx does not automatically start at boot time on macOS, so it will not automatically restart after a machine restart. If you want it to reboot in an hour, type +60. If you want to do it immediately, type now.
Replace