How to check the apache config on ubuntu

You can run the below commands to test and check the status of apache configuration. This will list the incorrect configuration or apache config which is breaking to start the apache, Go to apache installation directory, –  cd /etc/apache2 type the command  –  apache2ctl configtest

Installing apache, mysql and php on ubuntu

1.login using the putty to server ( You need to generate a key if using the AWS ) 2.Use the host name as ubuntu@publicip or instance name of server and select the key under auth generated from AWS 3.switch to root user by running the command sudo su 4.get the latest updates run below command sudo apt-get update 5.Installing apache sudo apt install apache2 6.Installing mysql server sudo apt-get install mysql-server 7.Installing the php (uninstall php if already installed using sudo apt-get –purge remove php*) sudo add-apt-repository ppa:ondrej/php sudo apt update sudo apt-get install php-7.0 8.Installing PHP extensions required such as MySQL,mbstring ,curl etc. sudo apt-get install php7.0-{mbstring,mcrypt,mysql,curl} i)Installing xml module used for sending emails on php sudo apt-get install php7.0-xml ii)Installing the curl for php sudo apt-get install php7.0-curl iii) Installing mcrypt module on php sudo apt-get install mcrypt php7.0-mcrypt 9.Enabling the restart on boot sudo systemctl enable apache2.service… Read more“Installing apache, mysql and php on ubuntu”