Situatie
Host a website on a Linux server.
Solutie
Step 1: Update System
sudo apt update && sudo apt upgrade -y
Step 2: Install Apache
sudo apt install apache2 -y
Step 3: Start and Enable Service
sudo systemctl start apache2
sudo systemctl enable apache2
sudo systemctl enable apache2
Step 4: Configure Firewall
sudo ufw allow ‘Apache’
sudo ufw enable
sudo ufw enable
Step 5: Deploy Website Files
- Place files in:
/var/www/html/
Step 6: Set Permissions
sudo chown -R www-data:www-data /var/www/html
Step 7: Test Server
- Open browser →
http://your-server-ip - Confirm Apache default page loads.
Leave A Comment?