Installing Apache HTTP Server in Ubuntu 18.04

by | Feb 24, 2023 | Uncategorized

Released in 1995, Apache HTTP is a free, open-source, cross-platform web server. It soon surpassed NCSA HTTPd to become the main web server. It served more than 100 million webpages for the first time in 2009 as web server software. Additionally, Apache was crucial to the early development of the World Wide Web. The Apache server project, an initiative to create and manage an open-source HTTP server for cutting-edge operating systems like UNIX and Windows, then appeared.A safe, effective, and extensible server that offers HTTP services in accordance with the most recent HTTP standards is what this project seeks to achieve. based on W3Tech’s evaluation of all webpages conducted in June 2022. With 31.4% of webpages, Apache came in second. This article will teach you how to set up Apache on Ubuntu 18.04.


  • 99RDP Server Running Ubuntu 18.04
  • Terminal Access

Installing the Apache Web Service

Let’s update the system’s existing meta packages first, then carry out the installation. To update the existing software packages and repository database, first open the terminal and enter each of the instructions listed one at a time.

# apt-get update

# apt get upgrade

Enter the instruction to install the Apache web server once the update is complete. And then type y to accept the programmes download dialogue box, then wait for it to complete.

# apt-get install apache2

Once the procedure is complete, view the IP address of the server in a web browser to confirm the installation.

http://99RDP server IP

The presence of the aforementioned page indicates that Apache was set up on your server properly. Let’s move on.

Configuring Firewall For Apache Web Server

We must modify our current firewall settings to permit outside traffic to reach the web server. Enter the command in the terminal to see the inventory of apps in ufw.

# ufw app list

We will only enable standard web traffic on port 80 because we haven’t set up SSL on the server. To enable unencrypted web traffic to the app list, type the provided command.

# ufw allow apache

Additionally, execute the provided command to check the firewall status and confirm that the app has been added to the allowed list.

# ufw status

The app rule has been added to give access to the Apache web server, as evidenced by the output.

Administering the services of the Apache Web Server

Now that the web server and firewall rules have been enabled, let’s go over some fundamental systemctl instructions for managing Apache.

systemctl stop apache2: stop the Apache service.

systemctl start apache2: simply start the Apache service.

systemctl restart apache2: to stop and start the Apache service.

systemctl status apache2: check the current running status of Apache service.

systemctl reload apache2: reload the new configuration changes to Apache service.

systemctl disable apache2: disable the automatic startup for Apache when the system boot.

systemctl enable apache2: re-enable the service to start up at boot.


Using Ubuntu 18.04, we demonstrated how to install and set up ufw for the Apache web server in this tutorial. At this stage, your Ubuntu server can successfully host multiple websites and serve any type of content. Feel free to contact us in the comments section below if you have any questions, concerns, or ideas.

Read Our Next Articles How to Monitor Processor Use in Ubuntu 18.04