This article is part of series of articles on Apache. Here is the list:
- Introduction to Apache Web Server.
- Difference between Apache http and Apache Tomcat.
- How to Install and Run Apache Web Server on Ubuntu Linux.(this one)
- 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.
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 ]’.
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.
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.
Check:
Again open up your browser and write localhost, now the message displayed is.
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.
Check:
Again open up your browser and write localhost, now the message displayed is.
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.
4 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 […]
Difference Between Apache Http And Apache Tomcat - Virtono Community · June 21, 2023 at 9:33 AM
[…] Difference between Apache http and Apache Tomcat.(this one) […]
Apache Web Server - Virtono Community · June 21, 2023 at 9:38 AM
[…] How to Install and Run Apache Web Server on Ubuntu Linux […]