Recently for one of my project we moved our web application to Amazon EC 2. So we had to configure Aapche and setup SFTP there. I faced some difficulties in setting this up so here in blog I am going to explain you the process so it will help you.
First of all login to SSH on your Amazon EC 2 instance. For that first you have to download public key from your amazon EC 2 instance. You can use public IP of your EC 2 instance to login to SSH.
Open your terminal and type following command.
ssh -i "YourKey.pem" ubuntu@your_ip_address
once you are logged in first of we have to install apache. For that run following command.