Setup
apt-get install php5-mcrypt
Create symlink to mods-avaliable
ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/mcrypt.ini
Enable It.
php5enmod mcrypt
Restart php-fpm
service php5-fpm restart
Restart nginx
sudo service nginx restart