Share it on :
In order to make your server support PHP and Mysql, you need to go through following steps: Connect to your Ubuntu EC2 instance via SSH through following command, only after opening the terminal in the directory where you have your downloaded key: sudo ssh -i "key_file_name.pem" ubuntu@hostname (You may be asked for your local machine admin password) 2. Once logged in type the following commands step by step: sudo apt-get install apache2 -> for installing Apache server, sudo sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/apache2/apache2.conf -> for disabling directory listing from browser, sudo apt-get update && sudo apt-get upgrade -> for updating and upgrading your server, sudo apt-get install php7.0-common php7.0-gd php7.0-mcrypt php7.0-curl php7.0-intl php7.0-xsl php7.0-mbstring php7.0-zip php7.0-iconv mysql-client -> for installing PHP 7.0 along with its extensions, (Extensions required for Magento only taken into consideration here. Other applications may require more or less than these extensions) 3. Next, run the commands below to stop, start and enable Apache2 service to always start up with the server boots : sudo systemctl stop apache2.service, sudo systemctl start apache2.service, sudo systemctl enable apache2.service, 4. Confirm you’re using Apache version 2.4: apache2 -v If this shows version 2.2 or another version, upgrade Apache before proceeding 5. Next, change directory to html by typing the following command in console : cd /var/www/html/ 6. Create a file named “info.php” by using following commands : sudo nano info.php Editor gets opened in your console. Type <?php phpinfo(); ?> Now Press Ctrl + X and then Enter 7. Hola! Your server is ready. Logon to your domain or IP and you’ll find a page displaying your server configuration.