HostOnNet Blog

How to install an Apache Server on ubuntu

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

localhost_apache

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