Easy Process to Host website on AWS

AWS Hosting Guide

Hosting a website on Amazon Web Services (AWS) can be challenging for many professionals. This step-by-step guide simplifies the process, helping you save costs and host multiple small websites efficiently. Note: This process is suitable for medium-traffic websites. For high-traffic sites, consider using AWS load balancers.

Step-by-Step Process to Host a Website on AWS

  1. Launch an EC2 Instance: Start by launching an EC2 instance using the Ubuntu 16.04 AMI from the AWS Marketplace. Download the PEM file during the final step of the instance setup.
  2. Configure Security Group: Ensure ports such as 80 (HTTP), 8080, 8083, 22 (SSH), and 143 (IMAP) are enabled in your EC2 instance’s security group to allow necessary traffic.
  3. Log in to the Instance: Use the SSH command to log in (e.g., sudo ssh -i /home/user/Downloads/aws_admin.pem ubuntu@52.66.129.45). Then, run sudo su to gain root access.
  4. Install Vesta Panel: Install Vesta Control Panel to manage your website hosting. Follow the detailed installation guide at Install Vesta Panel.
  5. Log in to Vesta Panel: After installation, access the Vesta Panel using your username and password.
  6. Create Hosting for Your Domain: Navigate to the “Web” section in Vesta Panel and set up hosting for your specific domain.
  7. Upload Website Files: Either create an FTP account or manually copy your website files to the EC2 hosting directory: /home/admin/web/your_domain/public_html.
  8. Create and Configure Database: In the “DB” section of Vesta Panel, create a database. Log in to phpMyAdmin to upload your database files.
  9. Update Database Credentials: Modify your website’s configuration file with the new database credentials.
  10. Update DNS Settings: Update your domain’s DNS settings at your domain name service provider to point to the public IP address of your EC2 instance.

Once complete, visit your website in a browser to confirm it’s live. If you encounter issues, feel free to comment for assistance.

Troubleshooting Tip: If your website displays the default page, remove the index.html file from the /home/admin/web/your_domain/public_html directory.

Related posts