Is it just the printer configuration page that gives you the gateway timeout error ?
You could try shortening the timeouts in /etc/nginx/nginx.conf by adding the following to the 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;
and then reloading nginx
/etc/init.d/nginx reload