APACHE

Install Apache webserver with the following command

sudo apt-get install apache2 -y

Next Change ownership to pi user,

sudo chown -R pi:www-data /var/www/html/ 
sudo chmod -R 770 /var/www/html/

Test Apache on Raspberry Pi

wget -O check_apache.html http://127.0.0.1 

Can also be tested by entering the Raspberry Pi’s IP address or http://localhost in a web browser. The default Webpage for Apache should appear, it can be found in /var/www/html/index.html

Documentation for Apache can be found at https://httpd.apache.org/docs/2.4/