All Guides
Apache Web Server Setup
Install Apache HTTP server and configure virtual hosts.
Intermediate20 min
Setup Steps
1. Install Apache:
sudo apt update
sudo apt install apache2 -y2. Start Apache and enable auto-start:
sudo systemctl start apache2
sudo systemctl enable apache23. Check status:
sudo systemctl status apache24. Create a virtual host:
sudo nano /etc/apache2/sites-available/mysite.conf5. Virtual host configuration:
<VirtualHost *:80>
ServerName mysite.com
ServerAlias www.mysite.com
DocumentRoot /var/www/mysite
ErrorLog ${APACHE_LOG_DIR}/mysite-error.log
CustomLog ${APACHE_LOG_DIR}/mysite-access.log combined
</VirtualHost>6. Create site directory:
sudo mkdir -p /var/www/mysite
sudo chown -R www-data:www-data /var/www/mysite7. Enable the site:
sudo a2ensite mysite.conf
sudo a2dissite 000-default.conf
sudo systemctl reload apache28. Enable mod_rewrite:
sudo a2enmod rewrite
sudo systemctl restart apache2Related Guides
Linux VPS Server Setup (Ubuntu)
Configure your Ubuntu-based VPS server from scratch. Security, user management and basic settings.
Nginx Web Server Setup
Install Nginx web server and configure it as a reverse proxy.
Let's Encrypt SSL Certificate Setup
Get a free SSL/TLS certificate with Certbot and enable HTTPS.
Node.js and npm Setup
Install Node.js runtime and npm package manager.