Building Your First Web Server: Deploying HTML with Nginx on AWS EC2.
I’ve recently completed a series of videos, diving into AWS foundational services with the help of a friend. Excitingly, I’ve moved on to the next phase — building a project using my newfound knowledge. Admittedly, the journey wasn’t without its challenges, but I’m eager to share the steps that worked for me, along with the errors I stumbled upon. In this guide, I’ll walk you through the steps that worked for me, highlighting the errors I faced, ensuring you’re well-prepared for your own project. so without further ado let’s get right to it!
These were the initial three rules I set for my instance. However, upon installing Nginx, I ran into multiple errors. To address this issue, I introduced an additional inbound rule — this time allowing traffic from anywhere using IPv6 on port 80. The errors stemmed from the fact that both my laptop and phone utilized IPv6.Step 3: You are now ready to connect to the newly created instance. Navigate to your SSH client, and we will establish a connection through that route. Locate the directory where you have stored your key. Right-click and open it in the terminal. Paste the SSH command.You have the option to conclude your journey at this point, but I opted to take an additional step and modify the default content of the Nginx homepage. To do this, navigate into the document root for Nginx, which is commonly set to /usr/share/nginx/html/ on various systems, including Amazon Linux. To edit or create a new HTML file, employ the command sudo nano index.html.
0 Comments