Nginx web-server Installation and Configuration With Custom HTML content on AWS Cloud

In this short guide, I’ll walk you through setting up Nginx server to serve a static HTML page on Aws Ubuntu Linux.

Step 1: Bootstrapping nginx installation on Ubuntu Linux and starting the nginx server with Aws user data, using terraform script.
Step…


This content originally appeared on DEV Community and was authored by Mayowa

In this short guide, I’ll walk you through setting up Nginx server to serve a static HTML page on Aws Ubuntu Linux.

Step 1: Bootstrapping nginx installation on Ubuntu Linux and starting the nginx server with Aws user data, using terraform script.
Step 2: Creation of a custom HTML page using terraform script on aws user data.
Step 3: Bootstrapping nginx configuring page on Aws user data, using terraform script.
Step 4: Accessing the custom page through: http://18.219.113.173:80/index.html

Challenges faced:

  • After the installation and configuration of nginx on aws cloud, I struggled to locate my custom html page. I kept seeing the nginx default page.

  • I omitted the addition of ssh security, so I wasn't able to access the server.

  • I also forgot to map the endpoint with port 80 (http) during server provisioning, so I wasn't able to access the URL on port 80.

Solution:
-After a little troubleshooting and careful study of the terraform script, I discovered it was because I didn't add port 80 in the terraform script. Then I edited the script and added the port and the issue was resolved.

-After careful study of the script, I discovered that it was because I didn't add the index.html path during nginx configuration. I edited the configuration file and added the path and the problem resolved.

  • After going through my terraform script, I discovered that I forgot to add ssh security group and after adding it, I was able to access the nginx server.

Personal Growth:
I can now confidently deploy html custom contents on a lightweight web-server like nginx.

With this few steps, you can deploy a custom HTML page on Nginx running locally. This setup is perfect for testing static websites, local development, or learning how Nginx works.

You can access the server through the following URL:
http://18.219.113.173:80/index.html

References:
https://hng.tech/internship/join
https://docs.aws.amazon.com/


This content originally appeared on DEV Community and was authored by Mayowa


Print Share Comment Cite Upload Translate Updates
APA

Mayowa | Sciencx (2025-01-31T01:31:50+00:00) Nginx web-server Installation and Configuration With Custom HTML content on AWS Cloud. Retrieved from https://www.scien.cx/2025/01/31/nginx-web-server-installation-and-configuration-with-custom-html-content-on-aws-cloud/

MLA
" » Nginx web-server Installation and Configuration With Custom HTML content on AWS Cloud." Mayowa | Sciencx - Friday January 31, 2025, https://www.scien.cx/2025/01/31/nginx-web-server-installation-and-configuration-with-custom-html-content-on-aws-cloud/
HARVARD
Mayowa | Sciencx Friday January 31, 2025 » Nginx web-server Installation and Configuration With Custom HTML content on AWS Cloud., viewed ,<https://www.scien.cx/2025/01/31/nginx-web-server-installation-and-configuration-with-custom-html-content-on-aws-cloud/>
VANCOUVER
Mayowa | Sciencx - » Nginx web-server Installation and Configuration With Custom HTML content on AWS Cloud. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/01/31/nginx-web-server-installation-and-configuration-with-custom-html-content-on-aws-cloud/
CHICAGO
" » Nginx web-server Installation and Configuration With Custom HTML content on AWS Cloud." Mayowa | Sciencx - Accessed . https://www.scien.cx/2025/01/31/nginx-web-server-installation-and-configuration-with-custom-html-content-on-aws-cloud/
IEEE
" » Nginx web-server Installation and Configuration With Custom HTML content on AWS Cloud." Mayowa | Sciencx [Online]. Available: https://www.scien.cx/2025/01/31/nginx-web-server-installation-and-configuration-with-custom-html-content-on-aws-cloud/. [Accessed: ]
rf:citation
» Nginx web-server Installation and Configuration With Custom HTML content on AWS Cloud | Mayowa | Sciencx | https://www.scien.cx/2025/01/31/nginx-web-server-installation-and-configuration-with-custom-html-content-on-aws-cloud/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.