Saturday, June 18, 2016

How to install Apache web server on Lubuntu 16.04

As web developer of course you will need to have a web server to work with, so in this article i will show you how to install apache web server on lubuntu 16.04 xenial xerus.

To install apache web server on lubuntu 16.04 is very simple, all you have to do is open terminal/ console/ command prompt and then run this command:

sudo apt-get install apache2

If somehow that doesn't work, you might want to run apt-get update first, after apache web server installed on your system, you can go to http://localhost/ to make sure it's really working.

You can start, stop, restart and get the status of apache web server with these commands :

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

You can put your web files (html, php, css, javascript, etc) inside /var/www/html/, that's because the default document root of apache web server is pointed to that place.

If you want to change the document root of apache web server you can do that by editing apache web server configuration file, which is on /etc/apache2/apache2.conf

sudo leafpad /etc/apache2/apache2.conf

No comments:

Post a Comment