How to install Apache webserver on Ubuntu ?

The Apache HTTP Server is a open-source HTTP server for modern operating systems including UNIX and Windows. Apache provides a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.

This post details, how you can install and setup the apache webserver on Ubuntu.

Install Apache Webserver

$ sudo apt-get install apache2 

Once above command is installed apache2 successfully without any error, you can see that apache server is running by following command as,

Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )


$ systemctl status apache2.service
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
   Active: active (running) since Mon 2020-05-18 23:58:33 IST; 12s ago
 Main PID: 8807 (apache2)
    Tasks: 55 (limit: 4915)
   CGroup: /system.slice/apache2.service
           ├─8807 /usr/sbin/apache2 -k start
           ├─8808 /usr/sbin/apache2 -k start
           └─8809 /usr/sbin/apache2 -k start

May 18 23:58:33 devlab systemd[1]: Starting The Apache HTTP Server...
May 18 23:58:33 devlab apachectl[8796]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using Set the 'ServerName' directive globally to suppress this m
May 18 23:58:33 devlab systemd[1]: Started The Apache HTTP Server.

Now, you can check that webserver is running by visiting its home page as http://localhost OR http://YOUR_IP in browser

Related :   How to Fix : sudo: unable to resolve host my_user: No such file or directory

NotE: If you have seen an error like “systemd[1]: Failed to start The Apache HTTP Server.” refer to our another post “Solved: systemd[1]: Failed to start The Apache HTTP Server.” to fix this error.


1 thought on “How to install Apache webserver on Ubuntu ?”

Leave a Comment

Android Android Build system Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded