How to Install Apache Web Server on Ubuntu Server?

Here, i will show you how to install apache on ubuntu server 20.04. this example will help you how to install apache in ubuntu server. This article will give you simple example of ubuntu server install apache2. This tutorial will give you simple example of ubuntu server 20.04 install apache2. follow bellow step for how to install apache2 in ubuntu 20.04.

In this post, i will give you list of command how to install apache in ubuntu server and how to use apache in linux server.

so, let’s see simple command to install and use apache2 command:

Install Apache:

Update Local Package:

sudo apt update

Install apache2 Package:

sudo apt install apache2

you can see terminal layout as bellow:

How to Install Apache Web Server on Ubuntu Server?

After install successfully apache2, you can go to browser and check your IP as like bellow and layout:

http://your_server_ip

Output:

How to Install Apache Web Server on Ubuntu Server?

Apache Command:

Here, i will give you list of apache command where you can stop, start and restart apache server. so let’s see one by one command:

Status Apache Server:

sudo systemctl status apache2

Stop Apache Server:

sudo systemctl stop apache2

Start Apache Server:

sudo systemctl start apache2

Restart Apache Server:

sudo systemctl restart apache2

Reload Apache Server:

sudo systemctl reload apache2

Disable Apache Server:

sudo systemctl disable apache2

Enable Apache Server:

sudo systemctl enable apache2

I hope it can help you…

Leave a Comment