HostOnNet Blog

How to install an Apache Server on ubuntu

Looking for Linux Server Admin or WordPress Expert? We can help.

First check if the package is installed or not

#dpkg -l | grep apache

If you did not get any output, install the package

Run below commands

#sudo apt-get update

#apt-get install apache*

Now start the apache service

#service apache2 restart

On the service at booting time

#update-rc.d apache2 on

Check if the web server is running or not by accessing local host

Access localhost from browser


On Ubuntu and Debian, apache2.conf is the main configuration file for the server. configuration files located in “/etc/apache2” folder.

About Annie

I've been working in Technical Section for over 10 years in a wide range of tech jobs from Tech Support to Software Testing. I started writing blog for my future reference and useful for all.
Posted in Apache, Ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.