I've found several solutions to convert Ubuntu 12.04 Desktop to Server, with the following commands:
sudo apt-get install tasksel
sudo tasksel remove ubuntu-desktop
sudo tasksel install server
apt-get install linux-server linux-image-server
apt-get –purge remove lightdm
I just want to know if it is the same process with Ubuntu 14.04. The reason I need to do this is because I need to install moodle (some people may have other reasons to do this so I hope this helps them too) and it requires to run over Ubuntu Server rather than Desktop. Thanks