Ubuntu: How to start and stop LAMP server

May 10, 2011 | In: LAMP, mysql, Ubuntu, web development

To view any changes in php.ini file or some LAMP server files we should restart the apache server again.  and you can do this by following commands:

sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 start

Above both commands will stop the apache server and start again. But you can do restart apache server by single command only:

sudo /etc/init.d/apache2 restart