fbpx

This article is part of series of articles on Apache. Here is the list:

  1. Introduction to Apache Web Server.
  2. Difference between Apache http and Apache Tomcat.
  3. How to Install and Run Apache Web Server on Ubuntu Linux.(this one)
  4. How to Install and Run Apache Web Server on Windows 10.

 

Original Article:

If you already read “Introduction to Apache Web Server” you already what Apache can do for you, however even if you didn’t and you are here, I believe you already know.

So without much delay lets begin and follow the steps below.

Step 1.

Open your terminal and type

sudo apt–get update

and hit enter, it shall upgrade all repository is your Ubuntu.

This may take some time, so check out some other article that you may like.

Step 2.

Now is the time to install Apache, so write

sudo apt-get install apache 2

and hit enter.

2

When asked yes or no, just press ‘y’ and hit enter.

And the installation begins.

At the end of the installation you’ll see something like ‘[ OK ]’.

3

Step 3.

Lets check if its working or not, Open up your favourite browser, write

localhost

on the address bar and hit enter.

And if you see   the message as below, your installation was a success.

4

 

 

 

To Stop the Web Server

Step 1. Again open up your terminal and write

sudo /etc/init.d/apache2 stop

‘/etc/init.d/apache2’ is the address where Apache is installed and ‘stop’ if the command you are giving.

5

Check:

Again open up your browser and write localhost, now the message displayed is.

6

 

 

To Start the Web Server

Step 1. Again open up your terminal and write

sudo /etc/init.d/apache2 start

‘/etc/init.d/apache2’ is the address where Apache is installed and ‘start’ if the command you are giving.

7

Check:

Again open up your browser and write localhost, now the message displayed is.

4

 

 

 

To Restart the Web Server

The difference between ‘start’ and ‘restart’ is if you made any changes to your webpage, to reflect those changes just restart without stoppingit.

 

Step 1. Again open up your terminal and write

sudo /etc/init.d/apache2 restart

‘/etc/init.d/apache2’ is the address where Apache is installed and ‘stop’ if the command you are giving.

Categories: Tutorials

2 Comments

Difference between Apache http and Apache Tomcat – Virtono Community · July 23, 2016 at 7:25 PM

[…] How to Install and Run Apache Web Server on Ubuntu Linux […]

Apache Web Server – Virtono Community · July 23, 2016 at 7:53 PM

[…] How to Install and Run Apache Web Server on Ubuntu Linux […]

Leave a Reply to Apache Web Server – Virtono Community Cancel reply

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

%d bloggers like this: