Let’s start with hosting a dynamic website on AWS.
Hosting a Dynamic Website on AWS
To host a dynamic website on AWS, you need to create an EC2 virtual machine for that, simply click on the “Launch instances” button from the Instances section from the left panel on the EC2 dashboard:
On this page, you need to enter the name and Image for your virtual machine:
Scroll down the page and select the instance type and create a key pair file using the link given on the page, then click on the “Launch Instance” button:
To connect it using RDP on the windows operating system simply click on the “Connect” button on the “Instance” page from the EC2 dashboard:
On the Connect page, select the “RDP client” section and then download the remote desktop file. Then open it by clicking on it and simply provide the credentials to connect to the RDP client:
After the connection has been established, the screen will be displayed on your display as shown in the screenshot below:
Before hosting a website, you need to change the firewall settings of your virtual machine. For that, simply go into “Firewall & network protection” and click on the “Advanced settings” button:
From there, click on the “Public Profile” section and set the inbound connections to “Allow,” and click on the “OK” button.
After all these configurations you need to download and install the “Xampp” server to host your dynamic website to download the XAMPP server click here, and from there you can download by clicking on the given versions:
It will take some time to download the XAMPP server depending on the internet speed:
Once the downloading is complete you need to install it on your virtual machine:
After the installation is complete, click on the “Start” button to start the services of Apache and MySQL:
After that, you need to paste your website files into the XAMPP server for that, use the following path:
Once your dynamic website’s files are pasted on the XAMPP server it will look like the screenshot below:
Now your virtual machine is ready to host a dynamic website on AWS. Open any web browser and paste the public IP address which is written below:
Through this IP address, your dynamic website will be available:
As you can see from the “Gif” below, a dynamic website is hosted on AWS
You have successfully hosted a dynamic website in AWS.
Conclusion
To host a dynamic website on AWS, you need to connect to your AWS virtual machine and simply change the firewall settings of your virtual machine that will host the website. Then install the XAMPP server to host your dynamic website. After that, simply open a web browser on the AWS virtual machine and paste the path to which your dynamic website files are located, and it will be accessible to the public. This post taught you how to host a dynamic website on AWS using the XAMPP server.