sudo update-rc.d -f apache2 disable sudo update-rc.d -f nginx disable
and then if you like to enable them again:
sudo update-rc.d apache2 enable sudo update-rc.d -f nginx enable
Or
chkconfig apache2 off chkconfig nginx off
To check/confirm:
chkconfig --list | grep apache2 chkconfig --list | grep nginx