AWS Tutorial: How to Host a Website on AWS EC2 Instance

AWS Tutorial: How to Host a Website on AWS EC2 Instance

How to Host a WordPress site on AWS: Instance:

I have updated this video and you can find the updated version here:

AWS Channel:

This tutorial will show you how to host a website on AWS EC2 instance and how to transfer files from S3 to an EC2 instance.

To host your Website on AWS EC2.
First zip the folder for the web files.
Next log into the management console and select S3 under service.
Create a bucket and upload that zip folder into that bucket.
Next, make that bucket and the object in the bucket public.
Launch an EC2 instance with SSH access
Copy the instance’s public ip address and SSH into your EC2 instance
Run the following commands in your terminal
sudo su
yum update -y
yum install httpd -y
chkconfig httpd on
cd /var/www/html
wget (S3 object URL)
unzip (folder full name including extension)
mv (sub folder full name )/* .
service httpd start

Last copy your instance public ip and paste it in the web browser.

#AWS #EC2 #AWSS3

43 thoughts on “AWS Tutorial: How to Host a Website on AWS EC2 Instance

  1. You can watch the full project here: https://www.youtube.com/playlist?list=PL184oVW5ERMAZ99fMM8vBso6JwqAbezBq

    I have created another video explaining the entire process including putty configuration, keypair, IAM role, and security groups on windows: https://youtu.be/dhRwKPrum44

  2. why amazon is so confusing, I was using smarterasp before and it only takes 4 to 5 clicks to publish your website

  3. can u fix this my webite is not responding it shows apache

    service httpd start

    Redirecting to /bin/systemctl start httpd.service

    pls

    fix this

  4. Great video except you missed to explain how to change the .pem file to .ppk "the private key" to access the AWS instance!

  5. can i put these commands inside provisioner remote exec within ec2 resource, when making a terraform template?

  6. I need to run a php file, but when i opened it into the public ip i just having the code but not the php working, can you help me?

  7. Where is the physical location of var/www/html? My machine? Does Apache have it? Amazon? I am clueless please enlighten me.

  8. help ! everything goes well until the PuTTY part where I have to enter my private key that I downloaded from AWS. My key has a .pem extension which is not recognised by the latest version of PuTTY. I've tried to rename my key's extension to .pkk but it's still not working. What can I do ? Great video by the way ! 🙂

  9. This is an excellent step by step explanation of everything that usually we have to do in order to deploy a websever. The only thing that i would suggest is that, since we are using an EC2 instance, we could automate every single step providing a shellscript in the "user config" EC2 configuration step. It would be really useful when deploying a more resource demanding version of the website and using auto scaling!

  10. I followed the steps, got Apache is running successfully but the html page is not loading from directory. It says "You may now add content to the directory /var/www/html/. "

    Please suggest , any help is appreciated

  11. im facing trouble can you help? i entered command mv website/* . then shows no directory found and how to solve this problems.

  12. can u create tutorial host website php and mysql then create phpadmin and conected file index to mysql phpmyadmin.

  13. Host your website and applications with JachOOs Cloud Hosting on AWS platform with unlimited SSD space, 30 days 2 times daily backup, unlimited email accounts, one click WordPress and other applications installer and much more protected with Imunify360 and ModSecurity powered by cPanel control panel. Highly reliable hosting on Amazon Web Services platform.
    See packages: https://jachoos.net/client/cart.php?gid=14 ■ [email protected] ■ WWW.JACHOOS.NET

  14. If my var/www/html directory is already full and I want to update(delete and reinstall) the files in it with new project files what is the command for removing the project files currently in the directory?

  15. Like others have mentioned I am also receiving a TEST PAGE from Apache. I'm BRAND new to AWS, so I just followed your instructions to the "t" on your video. Not sure what is going on.

  16. Hi I face a problem when change directory that no directory or file found can you pls help me to solve the same?

  17. your video is great as compared to many others…but after trying all the steps i have recieved the error while opening the ip address in the browser
    error is —
    "This page is used to test the proper operation of the Apache HTTP server after it has been installed. If you can read this page, it means that the Apache HTTP server installed at this site is working properly.
    "

Leave a Reply

Your email address will not be published. Required fields are marked *