Installation

# Install apache2
sudo apt install apache2
# View version
apache2 -version

Firewall

# View firewall list
sudo ufw app list
# Allow Apache
sudo ufw allow ‘Apache’
# View firewall status
sudo ufw status

Config Apache2

# View apache status
sudo systemctl status apache2
hostname –I
cd /var/www/

Permissions

Read more

# Full permissions
sudo chmod -R 777 /var/www/html/
# After updates, change permissions to
sudo chmod -R 755 /var/www/html/