Introduction: Apache Web Server

The Apache HTTP server is the most common and widely-used web server on the internet world. The most of the websites and web applications are hosted on Apache web server. It has many powerful features like dynamically loading modules, outstanding media support, and having large integration with other popular software.

In this article, we’ll explain the process to install the Apache web server on Ubuntu system or server.

Prerequisites: 

Before following the installation steps, make sure you should have the following:

• An Ubuntu system or server
• A non-root user with sudo privileges
• Internet connection on Ubuntu system

When you have an account to log in on Ubuntu system with sudo privileges log in and follow the below steps to install Apache web server.

Step 1 – Installing Apache

The Apache server package is available within Ubuntu’s default software repository, so we can install it by using the package management tool which is apt.

Step 2 – Adjust Firewall rules for apache2

To check the available application profile in ufw firewall, use the below command:

Here you can see there is two profile for Apache, one is just “Apache,” and another one is “Apache Full.” Where Apache is the most restrictive profile that allows port 80 to run Apache server and Apache Full allows to open 80 and 443 both port for Apache server.

Here, you can enable anyone as per your convenience, I am enabling most restrictive profile by using below command:

After enabling, you can verify it by the following command:

Step 3 – Checking your Web Server status

You can check Apache service is running or not with the system init system by using the command.

You can access the default apache landing page by using the Ubuntu system’s IP in the browser address bar.

If the Apache2 service is running, you will get below the Apache web page in your browser.

Step 4 – Apache service Handling Commands

To check the Apache’s service demon status, use the following command:

To check the Apache’s service demon status, use the following command:

To stop the Apache’s service demon use the following command:

Conclusion:

Now your apache http server is installed and ready to serve various content or web application through the internet.

If You Like What We Do Here On LinuxConcept, You Should Consider:

Stay Connected to: Twitter | Facebook

Subscribe to our email updates: Sign Up Now

 

We are thankful for your support.

Follow me

SATISH KUMAR

I am Satish Kumar, Founder of LinuxConcept. Linux and F.O.S.S enthusiast, love to work on open source platform and technologies.
Follow me