Createing an Ubuntu instance as an AMI, install cpanel for web hosting(vestacp.com), register the domain name (freenom.com) and live any website(FileZilla).
Create Ubuntu instance as an AMI using following steps:
Step 1: Log in to aws educate account and go to EC2. Launch a new instance.
Step 2: Select Ubuntu Server 18.04 LTS(HVM), SSD Volume Type.
Step 3: Choose an Instance Type and Click Next.
Step 4: Configure Instance Details and click next.
Step 5: Add storage. Add storage of 30 GIB and click on next.
Step 6: Add tags and click next.
Step 7: Configure security group. Add SSH, All TCP, All UDP, RDP, All traffic, HTTP, HTTPs. Use Anywhere on the source field. Click next.
Step 8: Review Instance Launch.
Step 9: Create a new key pair, download the key pair and Launch Instance.
Step 10: The following instance launching page is visible. Click on the instance id.
Create Elastic IP for the instance created above and the steps are as follows:
Step 1: On the left sidebar of EC2 click on Elastic IP.
Step 2: Click on Allocate Elastic IP Address and click on Allocate.
Step 3: Elastic IP is successfully generated. Provide a name for the Elastic IP.
Step 4: Now we need to assign the elastic IP to the instance, so, first click on the IP and actions. And, Click on Associate Elastic IP Address.
Step 5: Assign the instance id, private IP Address. Mark the checkbox for Allow the Elastic IP Address to be reassociated. And Finally, click on Associate. It will successfully assign the Elastic IP Address to the instance.
Step 6: Verify whether the elastic IP has been assigned to the instance or not. For this, go to the instance and select it. The elastic IP must be assigned.
Generating private key using the putty key generator and opening the putty terminal for the instance using the SSH Client of the instance.
Installing cpanel for web hosting (vestcp.com) and the steps are:
Step 1: Open the website vestacp.com. Click on Install Menu, the supported OS for Vesta is shown and Install instructions is also given
Step 2:We need to follow the install instructions for web hosting
Use command sudo su to enter root
Use curl –O http://vestacp.com/pub/vst-install.s for downloading installation scripts
To run Vesta.
For FQDN hostname, use the Public Ipv4 DNS of the instance
Use the Elastic IP for the Vesta Login.Select the Elastic IP of the instance .The vesta login would be for the above created instance :https://22.214.171.124:8083/login/
Registering the domain using Freenom (myfreenom.com).
Step 1: Login to the Freenom website.
Step 2: On the Services Menu, Click on Register a New Domain.
Step 3: Check availability for a domain.
Step 4: Select the domain type, I choose .tk .
Step 5:Now , we need to add the domain to the Vesta cpanel .So, add web domain
Step 6: We need to manage DNS so click on Manage Domain for the hellocloud.tk Domain.
Step 7: Click on Manage Freenom DNS.
Here, In the Target Field We need to assign the elastic IP of the domain, so copy the elastic IP from Vesta and paste it in the target Field.
Once all the above steps are done, verify whether the domain can be accessed or not. The Vesta may take some time to register the domain and The instance must be in running state.
Steps to follow to create live website :
Step 1: Initially, login to the Vesta using the username and password created earlier. The login url would be the elastic IP of the instance.
Step 2: Edit the domain section. Tick the Additional FTP box and add username and generate password and save the information. Keep the FTP username and password for future reference, to upload file in FileZilla.
Step 3: Download FileZilla if not installed previously. Open FileZilla. Enter the hostname, username and password.
Once the connection is successful, we need to upload files from local site to remote site. Select the file on local site and drag it to the remote site.
Note: The local files must be placed under public_html folder of the remote site.
Finally, when the file transfer is successful from local site to remote site, open the webpage for the domain. The content must be visible on the domain. We can see that our dynamic page has been uploaded to the server.
Hence in this Article, we learned to create a dynamic website by creating Ubuntu instance in an AMI, installing cpanel for web hosting(vestacp.com), registering the domain name (freenom.com) and live any website (FileZilla).