How To Install Apache on Ubuntu 14.04

r00t August 11, 2015

Install Apache on Ubuntu 14.04

This how to will help you with your install and configuration of Apache on your Ubuntu 14.04 server. For those of you who didn’t know, Apache is a HTTP web server, the most popular in use. It serves webpages when they’re requested by the web browsers. When you type an URL on your web server and press Enter, the pages you see on screen is most likely served by Apache webserver.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you through the step by step installation Apache on Ubuntu 14.04 server.

Install Apache on Ubuntu 14.04

Step 1. First of all make sure that all packages are up to date.

Step 2. Installing Apache web server on Ubuntu 14.04.

We will be installing Apache with apt-get, which is the default package manager for ubuntu:

Start Apache and add it to automatically start on your system start-up using:

You can verify that Apache is really running by opening your favorite web browser and entering the URL http://your-server’s-address, if it is installed, then you will see this:

Install Apache on Ubuntu 14.04

Apache Default Page

Configure Apache (Single Host)

We will now configure Apache by opening the main configuration file and edit ServerName and  ServerAdmin lines accordingly:

Now, we can restart Apache so that the changes take place:

Now you can create/upload your web content to the HTML directory of Apache.(Remember to replace the existing index.html file with your index.html which is your home page).

Configure Apache (Multi-Host)

If you would like to host multiple websites, proceed by opening the main configuration file, copy the existing Virtual Host entry and paste it underneath it. Then edit the ServerName, ServerAdmin, and  DocumentRoot lines accordingly.

Alternatively you can just copy the following entries and edit accordingly:

We must now make directories for the sites that were just configured, site1 and site2.

Now, we can restart Apache so that the changes take place:

Congratulation’s! You have successfully installed Apache. Thanks for using this tutorial for installing Apache web server in Ubuntu 14.04 system. For additional help or useful information, we recommend you to check the official Apache web site.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get a best deal!

Save

Save

Share on Google+0Share on Facebook0Tweet about this on TwitterShare on Tumblr0Share on StumbleUpon1Share on Reddit1Pin on Pinterest3
The Tags:

Leave a Comment