INSTALL Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 18.04

sudo apache2ctl configtest
sudo ufw app list
sudo nano /etc/apache2/apache2.conf

Inside, at the bottom of the file, add a ServerName directive, pointing to your primary domain name. If you do not have a domain name associated with your server, you can use your server’s public IP address:

Example:- ServerName localhost

Install MySQL

Note :- Installation may complete without asking for root password. Then here is the solution for setting root password and secure MySQL –  MySQL Server Installed Without Password For Root user On Ubuntu 17.10 / 18.04

Install PHP