sudo apt install apache2 apache2-utils apache2-dev
Upload and Enable a Site
With the commands above, you gave the non-root super-user sufficient permission to set up sites.
Upload any site directory to /var/www/html/your_site/
Go to /etc/apache2/sites-available/ and copy the default .conf file:
cp 000-default.conf your_site.conf
and modify with the following information:
ServerName your_site.com
ServerAlias www.your_site.com
ServerAdmin you@email.com
DocumentRoot /var/www/html/your_site
Use the following command to enable the site. What it actually does is copy the .conf file from /sites-available/ to /sites-enabled/:
sudo a2ensite your_site
opposite is sudo a2dissite your_site
sudo systemctl reload apache2
to show some server information:
ps aux | grep apache2 | less
#q
to get out of this command.