Решение проблем

upstream sent too big header while reading response header from upstream

fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;

no gd library detected

gd-install.sh
apt-get install php5-gd
service php5-fpm restart