$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">update
$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">update
$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">update
$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install apache2 -y
$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install apache2 -y
$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install apache2 -y
$ apachectl -v
$ apachectl -v
$ apachectl -v
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">enable apache2
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">start apache2
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">enable apache2
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">start apache2
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">enable apache2
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">start apache2
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">status apache2
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">status apache2
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">status apache2
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">stop apache2
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">restart apache2
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">stop apache2
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">restart apache2
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">stop apache2
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">restart apache2
$ -weight: 600;">sudo ufw allow 80/tcp
$ -weight: 600;">sudo ufw allow 443/tcp
$ -weight: 600;">sudo ufw allow 80/tcp
$ -weight: 600;">sudo ufw allow 443/tcp
$ -weight: 600;">sudo ufw allow 80/tcp
$ -weight: 600;">sudo ufw allow 443/tcp
$ -weight: 600;">sudo mkdir -p /var/www/app.example.com
$ -weight: 600;">sudo chown -R www-data:www-data /var/www/app.example.com
$ -weight: 600;">sudo mkdir -p /var/www/app.example.com
$ -weight: 600;">sudo chown -R www-data:www-data /var/www/app.example.com
$ -weight: 600;">sudo mkdir -p /var/www/app.example.com
$ -weight: 600;">sudo chown -R www-data:www-data /var/www/app.example.com
$ -weight: 600;">sudo nano /var/www/app.example.com/index.html
$ -weight: 600;">sudo nano /var/www/app.example.com/index.html
$ -weight: 600;">sudo nano /var/www/app.example.com/index.html
<!DOCTYPE html>
<html>
<head><title>My App</title></head>
<body><h1>Hello World from Apache on Ubuntu 26.04</h1></body>
</html>
<!DOCTYPE html>
<html>
<head><title>My App</title></head>
<body><h1>Hello World from Apache on Ubuntu 26.04</h1></body>
</html>
<!DOCTYPE html>
<html>
<head><title>My App</title></head>
<body><h1>Hello World from Apache on Ubuntu 26.04</h1></body>
</html>
$ -weight: 600;">sudo a2dissite 000-default.conf
$ -weight: 600;">sudo a2dissite 000-default.conf
$ -weight: 600;">sudo a2dissite 000-default.conf
$ -weight: 600;">sudo nano /etc/apache2/sites-available/app.example.com.conf
$ -weight: 600;">sudo nano /etc/apache2/sites-available/app.example.com.conf
$ -weight: 600;">sudo nano /etc/apache2/sites-available/app.example.com.conf
<VirtualHost *:80> ServerName app.example.com DocumentRoot /var/www/app.example.com <Directory /var/www/app.example.com> AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/app.example.com-error.log CustomLog ${APACHE_LOG_DIR}/app.example.com-access.log combined
</VirtualHost>
<VirtualHost *:80> ServerName app.example.com DocumentRoot /var/www/app.example.com <Directory /var/www/app.example.com> AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/app.example.com-error.log CustomLog ${APACHE_LOG_DIR}/app.example.com-access.log combined
</VirtualHost>
<VirtualHost *:80> ServerName app.example.com DocumentRoot /var/www/app.example.com <Directory /var/www/app.example.com> AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/app.example.com-error.log CustomLog ${APACHE_LOG_DIR}/app.example.com-access.log combined
</VirtualHost>
$ -weight: 600;">sudo a2ensite app.example.com.conf
$ -weight: 600;">sudo apachectl configtest
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">restart apache2
$ -weight: 600;">sudo a2ensite app.example.com.conf
$ -weight: 600;">sudo apachectl configtest
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">restart apache2
$ -weight: 600;">sudo a2ensite app.example.com.conf
$ -weight: 600;">sudo apachectl configtest
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">restart apache2
$ -weight: 500;">curl http://app.example.com
$ -weight: 500;">curl http://app.example.com
$ -weight: 500;">curl http://app.example.com
$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install certbot python3-certbot-apache -y
$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install certbot python3-certbot-apache -y
$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install certbot python3-certbot-apache -y
$ -weight: 600;">sudo certbot --apache -d app.example.com --agree-tos
$ -weight: 600;">sudo certbot --apache -d app.example.com --agree-tos
$ -weight: 600;">sudo certbot --apache -d app.example.com --agree-tos
$ -weight: 600;">sudo certbot renew --dry-run
$ -weight: 600;">sudo certbot renew --dry-run
$ -weight: 600;">sudo certbot renew --dry-run - Add PHP via PHP-FPM to serve dynamic content alongside Apache
- Configure Apache as a reverse proxy in front of a Node.js or Python application
- Enable HTTP/2 support with -weight: 600;">sudo a2enmod http2