Getting Started with Apache Web Server Setup 🛠️
Install Apache
On Ubuntu, use the command:sudo apt update && sudo apt install apache2
Configure Virtual Hosts
Edit/etc/apache2/sites-available/000-default.conf
to set up your domain.
✅ Example:<VirtualHost *:80> ServerAdmin admin@example.com DocumentRoot /var/www/html ServerName example.com ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
Test Server
Restart Apache and verify:sudo systemctl restart apache2 curl http://localhost