How To Install Apache Web Server on Ubuntu 24.04

Ubuntu 24.04 Desktop

How To Install Apache Web Server on Ubuntu 24.04

Introduction

The Apache web server is a popular open-source software that powers numerous websites around the world. It seamlessly works on Ubuntu 24.04 – as of the writing of this article, the latest version of Ubuntu. Apache can be easily integrated via the apt-get package manager and allows hosting of static and dynamic content, virtual hosts management, web traffic and more. Multiple programming languages like PHP, Python, and Ruby are supported. Use of Apache on Ubuntu 24.04 is an efficient solution for web hosting needs.

Introduction

This tutorial assumes that you have already installed and configured Ubuntu Server. If you have not done so already, please follow our guide on installing and configuring Ubuntu Server 24.04 (coming soon).

Step 1 - Install Apache

Apache is available in the Ubuntu repositories by default.

The first step is to ensure we have the latest package index. You can get this by running the following command:

				
					sudo apt update -y
				
			

Once the local index is updated we can now install Apache using the apache2 package.

				
					sudo apt install apache2 -y
				
			

Step 1 - Configuring the Firewall

Now that we have installed apache we need to allow access. To do this we need to add apache to the allow list of our operating systems firewall. We can do this by running the following command:

				
					sudo ufw allow apache -y
				
			

The output will look something like this:

				
					Rules updated
Rules updated (v6)
				
			

We should now be able to access the default apache page on our server. To do this we need to know our servers IP address. If you do not already know this we can obtain this by running the ifconfig command. Depending on your installation you may or may not have the tools required for this command. If you cannot run this command we need to install net-tools. To do this, run the following command:

				
					sudo apt install net-tools -y
				
			

With net-tools installed we can now run the ifconfig command. This will give us the IP address we need. Type the IP address into your web browser and you should be greeted with the default apache page.

If you are not, insure that apache is running by running the following command on your server:

 

				
					sudo systemctl status apache2
sudo systemctl enable apache2
sudo systemctl start apache2
				
			

In conclusion, installing Apache on Ubuntu is a straightforward process that can be done quickly and efficiently. By following the steps outlined in this guide, anyone can successfully install and configure Apache on their Ubuntu system. Overall, Apache is a reliable and widely-used web server that is well-suited for hosting any website or application.

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Posts

How To Easily Setup A UniFi Controller on Linux (Debian based)

Introduction Looking to boost your network’s productivity and efficiency in a friendly...

Read More
Windows Server Desktop

Update Your Windows Devices Now

This CVE Can Be Exploited Without Any User Interaction A critical security...

Read More
Installation complete

How To Install PfSense on XCP-NG

Introduction While we would never suggest installing PfSense as a VM in...

Read More

Apple Announces New iPad Pro (2024)

Source: Apple.com What’s New? The new iPad Pro unveiled at Apple’s “Let...

Read More
Ubuntu 24.04 Desktop

How To Install Apache Web Server on Ubuntu 24.04

Introduction The Apache web server is a popular open-source software that powers...

Read More
Ubuntu 24.04 Desktop

10 New & Improved Features in Ubuntu 24.04

A Brief History Ubuntu is an open-source Linux distribution that has gained immense...

Read More