<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Surav Shrestha</title>
    <description>The latest articles on DEV Community by Surav Shrestha (@suravshrestha).</description>
    <link>https://dev.to/suravshrestha</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1534040%2F13f934a8-dc60-4a8b-b630-2bfcae42119b.png</url>
      <title>DEV Community: Surav Shrestha</title>
      <link>https://dev.to/suravshrestha</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/suravshrestha"/>
    <language>en</language>
    <item>
      <title>Install Apache Web Server in Amazon Linux EC2 Instance</title>
      <dc:creator>Surav Shrestha</dc:creator>
      <pubDate>Mon, 27 May 2024 16:06:58 +0000</pubDate>
      <link>https://dev.to/suravshrestha/install-apache-web-server-in-amazon-linux-ec2-instance-3e38</link>
      <guid>https://dev.to/suravshrestha/install-apache-web-server-in-amazon-linux-ec2-instance-3e38</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5jpb475thffqpep6dsy5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5jpb475thffqpep6dsy5.png" alt="Apache Web Server" width="600" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Installing a web server is a foundational step in web development and server management. &lt;a href="https://httpd.apache.org/"&gt;Apache&lt;/a&gt; is one of the most popular web servers due to its reliability and extensive features. In this guide, we'll walk you through the steps to install and configure the Apache Web Server on an Amazon Linux AWS EC2 instance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;p&gt;Before we begin, ensure you have the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;An &lt;a href="https://aws.amazon.com/"&gt;AWS&lt;/a&gt; account&lt;/li&gt;
&lt;li&gt;An EC2 instance running Amazon Linux&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 1: Launch and Connect to EC2 Instance
&lt;/h3&gt;

&lt;p&gt;For detailed instructions on launching and connecting to an AWS EC2 instance, you can refer to this article: &lt;a href="https://dev.to/suravshrestha/launch-and-connect-to-aws-ec2-instance-47bm"&gt;Launch and Connect to AWS EC2 Instance&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; When launching the EC2 instance, leave the AMI (Amazon Machine Image) set to the default, which is Amazon Linux.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Update Your Instance
&lt;/h3&gt;

&lt;p&gt;Once connected to your EC2 instance, update the package lists:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;yum update &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Install Apache Web Server
&lt;/h3&gt;

&lt;p&gt;Now, install Apache (&lt;code&gt;httpd&lt;/code&gt; is the Apache package for Amazon Linux) using the package manager (&lt;code&gt;yum&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;yum &lt;span class="nb"&gt;install &lt;/span&gt;httpd &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Start and Enable Apache
&lt;/h3&gt;

&lt;p&gt;To start Apache and enable it to start on boot, use the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start httpd
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;httpd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5: Verify Apache Installation
&lt;/h3&gt;

&lt;p&gt;You can verify that Apache is running by accessing your instance’s public IP address in a web browser:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;http://ec2-18-208-219-229.compute-1.amazonaws.com
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkubax5k8p3857izb3y7m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkubax5k8p3857izb3y7m.png" alt="Amazon Linux Apache Default Page" width="592" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should see the default Apache2 Amazon Linux Default Page, indicating that Apache is successfully installed and running. 🎉&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;You’ve successfully installed and configured the Apache Web Server on your Amazon Linux AWS EC2 instance. This setup can now serve as the foundation for your web applications. 🌐&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://httpd.apache.org/docs/"&gt;Apache HTTP Server Documentation&lt;/a&gt; 📚&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/ec2/"&gt;AWS EC2 Documentation&lt;/a&gt; 📖&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have any questions or run into issues, feel free to leave a comment below.&lt;/p&gt;

&lt;p&gt;Happy coding! 👩‍💻👨‍💻&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>cloudcomputing</category>
      <category>iaas</category>
    </item>
    <item>
      <title>Launch and Connect to AWS EC2 Instance</title>
      <dc:creator>Surav Shrestha</dc:creator>
      <pubDate>Mon, 27 May 2024 15:38:53 +0000</pubDate>
      <link>https://dev.to/suravshrestha/launch-and-connect-to-aws-ec2-instance-47bm</link>
      <guid>https://dev.to/suravshrestha/launch-and-connect-to-aws-ec2-instance-47bm</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6yvgonjn9u8ohb89kjg6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6yvgonjn9u8ohb89kjg6.png" alt="Amazon EC2" width="401" height="257"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Launching and connecting to an AWS EC2 instance is a fundamental task for any cloud-based development or application hosting. This guide will walk you through the steps to create and connect to an EC2 instance on AWS, and then verify the connection by running some basic commands.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;p&gt;Before starting, ensure you have an &lt;a href="https://aws.amazon.com/"&gt;AWS&lt;/a&gt; account. ☁️&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Launch an EC2 Instance
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Log in to your AWS Management Console&lt;/strong&gt;. 🔑&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Navigate to the EC2 Dashboard&lt;/strong&gt; and click on "Launch Instance". 🚀&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2w5ji07vcoya21ovsk1u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2w5ji07vcoya21ovsk1u.png" alt="Launch Instance" width="609" height="361"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Configure the instance settings as follows&lt;/strong&gt; (leave other settings as default):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enter the name of the EC2 Instance&lt;/strong&gt; (e.g., "My EC2 Instance"). 🖥️
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb83w1fj9xulbyd2a5xnf.png" alt="Enter the name of the EC2 Instance" width="800" height="338"&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Select &lt;code&gt;Ubuntu&lt;/code&gt; as the Amazon Machine Image (AMI)&lt;/strong&gt;. 🐧
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F620fayke5vt5wxf21keq.png" alt="Select Ubuntu as the AMI" width="800" height="439"&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create a key pair to access the instance from the command line&lt;/strong&gt;. 🔑
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8kew1qlb4zgoyyysqh3l.png" alt="Create a key pair button click" width="800" height="259"&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enter an appropriate name for the key pair&lt;/strong&gt;. 📝
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fztc5pg16735f03rnrurr.png" alt="Key pair configurations" width="481" height="510"&gt;
This will save the key pair file (named &lt;code&gt;ec2-instance.pem&lt;/code&gt; in this case) to your local machine. 💾&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configure the Security Group&lt;/strong&gt; - add a rule to allow HTTP traffic (port 80). 🔒
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0uur1a63zqd8m8klxlgs.png" alt="Allow HTTP traffic" width="742" height="555"&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Review your settings and launch the instance&lt;/strong&gt;. ✅&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9gpcrfjxdivdkij3gxwt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9gpcrfjxdivdkij3gxwt.png" alt="EC2 Instance summary" width="385" height="554"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 2: Connect to Your EC2 Instance
&lt;/h3&gt;

&lt;p&gt;After the instance is successfully running:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Click on the &lt;code&gt;Instance ID&lt;/code&gt; of the EC2 instance you just created&lt;/strong&gt;. 🆔&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm5u567v5ckm3hhe24jdf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm5u567v5ckm3hhe24jdf.png" alt="EC2 Dashboard Running Instances" width="800" height="358"&gt;&lt;/a&gt; &lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhuxdtz6twcjtgtax2twy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhuxdtz6twcjtgtax2twy.png" alt="Running Instances" width="759" height="192"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;On the Instance summary page, click on the &lt;code&gt;Connect&lt;/code&gt; button&lt;/strong&gt;. 🔌&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1v20j8jdfevcpjva9sce.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1v20j8jdfevcpjva9sce.png" alt="EC2 Instance summary" width="800" height="253"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Copy the command to connect to the EC2 instance&lt;/strong&gt;. 📋&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbkwr1bmq8765silbcc2b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbkwr1bmq8765silbcc2b.png" alt="Connect to the EC2 Instance" width="800" height="493"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Open a new local terminal from where the private key was saved&lt;/strong&gt;. 🖥️&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Run this command to ensure your key is not publicly viewable&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo chmod &lt;/span&gt;400 &lt;span class="s2"&gt;"ec2-instance.pem"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Paste the command copied from Step 3 to connect to your instance&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;ssh &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="s2"&gt;"ec2-instance.pem"&lt;/span&gt; ubuntu@ec2-18-208-219-229.compute-1.amazonaws.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 3: Verify Your EC2 Instance
&lt;/h3&gt;

&lt;p&gt;After connecting to the EC2 instance, you can use commands as you would on your local machine. Here are some common commands to verify and manage your instance:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Update the package list&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Upgrade the installed packages&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt upgrade &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;You've successfully launched, connected to, and verified your AWS EC2 instance. This setup can now serve as the foundation for your web applications or development environment. 🌐&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/ec2/"&gt;AWS EC2 Documentation&lt;/a&gt; 📖&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have any questions or run into issues, feel free to leave a comment below.&lt;/p&gt;

&lt;p&gt;Happy cloud computing! ☁️👩‍💻👨‍💻&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>cloudcomputing</category>
      <category>iaas</category>
    </item>
    <item>
      <title>Install Apache Web Server in Ubuntu AWS EC2 Instance</title>
      <dc:creator>Surav Shrestha</dc:creator>
      <pubDate>Mon, 27 May 2024 14:35:59 +0000</pubDate>
      <link>https://dev.to/suravshrestha/install-apache-web-server-in-ubuntu-aws-ec2-instance-5fgf</link>
      <guid>https://dev.to/suravshrestha/install-apache-web-server-in-ubuntu-aws-ec2-instance-5fgf</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5jpb475thffqpep6dsy5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5jpb475thffqpep6dsy5.png" alt="Apache Web Server"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Installing a web server is a foundational step in web development and server management. &lt;a href="https://httpd.apache.org/" rel="noopener noreferrer"&gt;Apache&lt;/a&gt; is one of the most popular web servers due to its reliability and extensive features. In this guide, we'll walk you through the steps to install and configure the Apache Web Server on an Ubuntu AWS EC2 instance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;p&gt;Before we begin, ensure you have the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;An &lt;a href="https://aws.amazon.com/" rel="noopener noreferrer"&gt;AWS&lt;/a&gt; account&lt;/li&gt;
&lt;li&gt;An EC2 instance running Ubuntu&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 1: Launch and Connect to EC2 Instance
&lt;/h3&gt;

&lt;p&gt;For detailed instructions on launching and connecting to an AWS EC2 instance, you can refer to this article: &lt;a href="https://dev.to/suravshrestha/launch-and-connect-to-aws-ec2-instance-47bm"&gt;Launch and Connect to AWS EC2 Instance&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Update Your Instance
&lt;/h3&gt;

&lt;p&gt;Once connected to your EC2 instance, update the package lists:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Step 3: Install Apache Web Server
&lt;/h3&gt;

&lt;p&gt;Now, install Apache using the package manager:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;apache2 &lt;span class="nt"&gt;-y&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Step 4: Verify Apache Installation
&lt;/h3&gt;

&lt;p&gt;You can verify that Apache is running by accessing your instance’s public IP address in a web browser:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;

http://ec2-18-208-219-229.compute-1.amazonaws.com


&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fye1k1aapgxrryfmhxayx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fye1k1aapgxrryfmhxayx.png" alt="Apache2 Default Page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should see the default Apache2 Ubuntu Default Page, indicating that Apache is successfully installed and running. 🎉&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The webpage is served from the &lt;code&gt;/var/www/html/index.html&lt;/code&gt; file in the EC2 instance. You can edit this file to customize the content as desired.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;You’ve successfully installed and configured the Apache Web Server on your Ubuntu AWS EC2 instance. This setup can now serve as the foundation for your web applications. 🌐&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://httpd.apache.org/docs/" rel="noopener noreferrer"&gt;Apache HTTP Server Documentation&lt;/a&gt; 📚&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/ec2/" rel="noopener noreferrer"&gt;AWS EC2 Documentation&lt;/a&gt; 📖&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have any questions or run into issues, feel free to leave a comment below.&lt;/p&gt;

&lt;p&gt;Happy coding! 👩‍💻👨‍💻&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>aws</category>
      <category>cloudcomputing</category>
      <category>iaas</category>
    </item>
  </channel>
</rss>
