How to install apache on Ubuntu Operating System

TL;DR for how to install apache on ubuntu!


OS Version: Ubuntu Os 18.04.3 (LTS) x64
Apache version: Apache/2.4.29 (Ubuntu)

Full Read

Update operating system:

bluegrid-edu:~# apt-get update

Install the apache Web server:

bluegrid-edu:~# apt-get install apache2

Confirm that service is installed and running:

how to install apache on ubuntu | apache status check
Checking apache status

Now just to make sure it auto-starts when operating system boots in:

bluegrid-edu:~# systemctl enable apache2
how to install apache on ubuntu | apache auto-start enable
enabling auto-start for apache service

That’s it!

We can check out the response and see that it’s served by apache:

bluegrid-edu:~# curl -I
HTTP/1.1 200 OK
Date: Sun, 26 Jul 2020 15:16:51 GMT
Server: Apache/2.4.29 (Ubuntu)
Last-Modified: Sun, 26 Jul 2020 15:12:25 GMT
ETag: "2aa6-5ab59a23dd33d"
Accept-Ranges: bytes
Content-Length: 10918
Vary: Accept-Encoding
Content-Type: text/html
Share this post

Share this link via

Or copy link