Skip to content

Instantly share code, notes, and snippets.

@oliverlabs
Last active July 20, 2023 08:15
Show Gist options
  • Save oliverlabs/99171b5dfd9813295a0d86b1ca4c5324 to your computer and use it in GitHub Desktop.
Save oliverlabs/99171b5dfd9813295a0d86b1ca4c5324 to your computer and use it in GitHub Desktop.
Install Apache on a Lunux VM

Step 1 - Install Apache2

sudo apt install -y apache2

Step 2 - Open an inbound port in an NSG

Open Port 80 or 443

Step 3 - Check Apache2 Server Status

sudo systemctl status apache2

Step 4 - Copy Files for the Website

git clone [repository_url]

Step 5 - Remove the Default Apache Webpage

sudo rm /var/www/html/index.html

Step 6 - Copy the New Website Files

sudo cp -r * /var/www/html/

Step 7 - Restart the Apache Server

sudo systemctl restart apache2
sudo systemctl status apache2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment