The following command can be used to restart Apache2 on Ubuntu

sudo /etc/init.d/apache2 restart