Install Apache web server in Ubuntu

February 15, 2012 in Apache

Install Apache web server in Ubuntu / Debian

What is apache?

Apache is the most popular web server on the internet. It is highly configurable with third party modules, can run under several Operating Systems including Ubuntu and its very secure and stable. That is why more than 50% of websites currently running on the internet have an Apache server behind them.

How to install Apache on Ubuntu 11.04

You can install Apache2 from the Terminal by using:

$> sudo apt-get install apache2

when the installation is finished Apache is up and running and you can test that by point your web browser to http://localhost/

The default site will came up with some information about apache. This html file is located under your local file system in folder /var/www/html/

If you want to test farther your web site you can edit this default webpage by typing:

$> sudo gedit /var/www/html/index.html

Change the content to <html><body><h1>This is my First Web site and it Works</h1>

Now save that and restart Apache by typing:

$> sudo /etc/init.d/apache2 restart

Refresh your web browser and see it in action!

Here is a video tutorial about how to install and test Apache2 Server on Ubuntu