How To Install Apache Webserver On Ubuntu 20.04

Posting Komentar

How to install apache webserver on ubuntu 20.04, the Apache HTTP Server is a webserver that is very popular and widely used in the world. There are many features that support as well as the module is a dynamic, media support and can be integrated with software other popular.

Terms How to install the Apache Webserver in Ubuntu 20.04

Before starting the tutorial how to install apache, generally there will be a user of the regular instead of the root with sudo privileges. As some of the required basic settings of the firewall to close the port-a port that is not essential and could potentially be a security loopholes. For basic setting of firewall and the basic needs of the ubuntu server 20.04 LTS can follow the Initial Setup Ubuntu Server 20.04 LTS Minimalist Mandatory

1. Install Apache Webserver on Ubuntu 20.04 LTS

Package Apache Webserver by default is already contained in the repository of Ubuntu 20.04 LTS, so the process to install the apache webserver can be easily done through the package management.

Update first repository to get the list of packages to the most recent. To speed up the process of updates and upgrades can follow the guide Repository of Ubuntu 20.04 Focal Fossa Indonesia Complete first for that located in Indonesia.

$sudo apt update

Proceed with the install package apache2

$sudo apt install apache2

Apt install Apache2 along with the other packages needed by apache2. Wait the process until finish.

2. Firewall Settings

Before performing the test results install apache2, the first thing to do is make our firewall to allow access to the default http port/website. During the process of installation, Apache registration profile automatically so that the UFW (uncomplicated firewall) recognize some of the settings of Apache that can be used to enable and disable access to Apache.

To be able to see the list profile are available with the following command

$ sudo ufw app list

List profile will look like the following

Output
Available applications:
Apache
Apache Full
Apache Secure
OpenSSH

As seen in the output above, the following are some of the profile which are available to Apache

Apache : profile this will only open the port 80 and it is the default and is not encrypted.
Apache Full : profile this will open port 80 and port 443 (TLS/SSL) encrypted.
Apache Secure : to profile the last this will only open the port 443 and is highly recommended as it can increase SEO (Serach Engine Optimization)

So once advised to open access on a port option is most secure. Because the tutorial how to install apache webserver in ubuntu 20.04 is not going to do the configuration of apache to run on SSL/TLS then the port will be opened just port the default web server 80.

$ sudo ufw allow 'Apache'

To ensure the status of the port 80 is already open

$sudo ufw status
Output
Status: active

To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
Apache ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
Apache (v6) ALLOW Anywhere (v6)

3. Check out the Results Install Apache Webserver on Ubuntu 20.04

During the process of install apache webserver in ubuntu 20.04 LTS is over, automatically ubuntu will run the apache. A Webserver should have been running, to make sure that the apche web server has been running well is as follows

$sudo systemctl status apache2
Output
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-04-23 22:36:30 UTC; 20h ago
Docs: https://httpd.apache.org/docs/2.4/
Main PID: islands province 29435 (apache2)
Tasks: 55 (limit: 1137)
Memory: 8.0 M
CGroup: /system.slice/apache2.service
├─Islands province 29435 /usr/sbin/apache2 -k start
├─29437 /usr/sbin/apache2 -k start
└─29438 /usr/sbin/apache2 -k start

As shown on the above results, the current apache is already running. Aside from the above result that can be done is to access the default landing of an Apache access using the IP Address of ubuntu server 20.04 LTS, and the result will look like the image below.

The Default Landing Page of the Apache Webserver in Ubuntu

If the result of the access to the webserver through IP Address has looked like the above then How to Install Apache Webserver in Ubuntu 20.04 LTS has been completed, the next can add a VirtualHost for the project-a cool project you guys.

Related Posts

Posting Komentar