Sunday, November 5, 2017

How to install Apache Web Server on Lubuntu 17.10

How to install Apache Web Server on Lubuntu 17.10

You will need a web server if you want to develop website on localhost, people usually use apache 2 for web server whether on localhost or on real production server. In this article i will show you how to install apache web server on lubuntu 17.10.

How to install Apache 2 Web Server on Lubuntu 17.10
  • open command line/terminal on lubuntu, press CTRL + ALT + T
  • run update command 
  • sudo apt-get update
  • install apache web server
  • sudo apt-get install apache2
  • check the status, make sure it's running
  • sudo service apache2 status
  • open http://localhost/ to check it out

How to start, stop, restart Apache 2 web server
You can start, stop and restart apache 2 web server with these commands:

start apache 2 service
sudo service apache2 start
stop apache 2 service
sudo service apache2 stop
restart apache 2 service
sudo service apache2 restart
check status apache 2 service
sudo service apache2 status

Where should i put my web files?
You can put your web files (html, css, js, php, etc) on /var/www/html/, you can create new folder there if you want.

Where is Apache 2 config file located?
Apache web server configuration file is located under /etc/apache2/apache2.conf, remember you need to open it with sudo. Doing backup before editing the config file is a good idea and always restart the web server after editing the config file.

How to uninstall Apache 2 web server
You can uninstall apache 2 web server using these commands (choose one):
sudo apt-get remove apache2
sudo apt-get purge apache2


No comments:

Post a Comment