Saturday, January 16, 2016

How to install Apache web server on Ubuntu

Alright folks, in this article i will show you how to install apache web server on ubuntu, we are going to install apache version 2 (apache2), i'm currently use ubuntu 15.10 willy and this tutorial should be the same for other version of ubuntu.

To install apache web server on ubuntu is very simple, open terminal/console/command line and then type the following command (make sure your internet works):

sudo apt-get install apache2

Once installed, you can check whether apache web server is currently running or not, by running this command to check the status of apache2 web server:

sudo service apache2 status

Okay now, open your favorite web browser and then go to http://localhost or, if apache web server is active, you should see the apache web server default page.

By default you can put your web page on /var/www/html/, and of course you can change that if you want, the apache web server configuration file is located at /etc/apache2/apache2.conf.

Make sure to restart the web server after editing the configuration file, it's also a good idea to backup first the original config file before editing it.

How to stop, start, and restart apache2 web server?

You can stop start and restart apache2 web server using these commands:

sudo service apache2 stop
sudo service apache2 start
sudo service apache2 restart

Alright, now that we know how to install apache web server and start, stop, restart the service, next i'm going to show you how to install php and mysql on ubuntu.

No comments:

Post a Comment