Solved – 504 Gateway Timeout Error In Nginx Web Server

-Open your nginx.conf file located in /etc/nginx directory

-Add this below piece of code under http { section

client_header_timeout 3000;
client_body_timeout 3000;
fastcgi_read_timeout 3000;
client_max_body_size 32m;
fastcgi_buffers 8 128k;
fastcgi_buffer_size 128k;

Note - If its already present , change the values according.

That’s it. Reload Nginx and php5-fpm.

service nginx reload

service php5-fpm reload

If the error persists ( which is rare ), consider increasing the values.

Installing phpMyAdmin+Magento on Ubuntu 11.04+ for Nginx Web Server

Before proceeding make sure you have a working LEMP installation following this tutorial .

Make sure you are logged with root privileges.

Installing phpMyAdmin

apt-get install phpmyadmin

-Press ‘Y’ on promt during installation

-Web Server to reconfigure automatically : select none (apache2 and lighttpd are ) -> Press Esc to select none

Vhost Configuration

mkdir -p /var/www/

-p, no error if existing, make parent directories as needed

- replace with your domain name or IP address.

Continue reading