Google Meet:
https://meet.google.com/dut-mhfu-gtx?pli=1
sample:
<!DOCTYPE html>
<html>
<body style=”text-align:center; background-color:black;”><img src=”picture.jpg” alt=”alternative text”><p style=”color:white;”>My first paragraph.</p>
</body>
</html>
1. Introduction to Apache2 (15 minutes)
- Overview:
- What is Apache2? (Brief history, its role as a web server)
- Key features and benefits
- Apache2 vs. other web servers (Nginx, etc.)
2. Apache2 Installation and Initial Setup (15 minutes)
- Installation:
- Installing Apache2 on different Linux distributions (e.g., apt-get install apache2 for Debian-based systems, yum install httpd for Red Hat-based systems)
- Configuration Files:
- Key configuration files (e.g., /etc/apache2/apache2.conf, /etc/apache2/sites-available/000-default.conf)
- Basic file structure and locations
3. Basic Command Line Operations (30 minutes)
- Starting and Stopping Apache2:
- sudo systemctl start apache2
- sudo systemctl stop apache2
- sudo systemctl restart apache2
- sudo systemctl reload apache2
- Checking Status:
- sudo systemctl status apache2
- Checking Apache2 Version:
- apache2 -v or apachectl -v
- Hands-On Exercise:
- Practice starting, stopping, and checking the status of Apache2.
Hour 2: Configuration Management
1. Understanding Apache2 Configuration Files (20 minutes)
- Main Configuration File:
- Overview of apache2.conf
- Virtual Hosts:
- Setting up virtual hosts in /etc/apache2/sites-available/
- Enabling and disabling sites with a2ensite and a2dissite
2. Editing and Testing Configuration (20 minutes)
- Editing Configuration Files:
- Practical examples of changing document roots, server names, and ports
- Testing Configuration Changes:
- sudo apachectl configtest
- Understanding common error messages
3. Hands-On Exercise:
- Modify a virtual host configuration and test changes
- Enable/Disable a virtual host and observe the changes
Hour 3: Security and Performance Tuning
1. Security Basics (20 minutes)
- User and Group:
- Configuring Apache2 to run under a specific user and group
- File Permissions:
- Setting correct permissions on web directories
- Basic Security Modules:
- Overview of mod_security and other security-related modules
2. Performance Tuning (20 minutes)
- Common Settings:
- Tuning Timeout, KeepAlive, and MaxClients (or MaxRequestWorkers)
- Log Management:
- Configuring access and error logs
- Using tools like logrotate to manage log files
3. Hands-On Exercise:
- Apply basic security configurations
- Adjust performance settings and monitor the effects
Hour 4: Troubleshooting and Advanced Topics
1. Troubleshooting Common Issues (20 minutes)
- Log Files:
- Where to find and how to read Apache2 logs (/var/log/apache2/error.log, /var/log/apache2/access.log)
- Common Problems:
- Misconfigurations, permission issues, port conflicts
- Using journalctl for Systemd Logs:
- sudo journalctl -u apache2
2. Advanced Topics (20 minutes)
- Apache Modules:
- List and enable/disable modules with a2enmod and a2dismod
- Performance and Security Enhancements:
- Caching strategies (e.g., mod_cache)
- SSL/TLS setup for HTTPS (brief overview)
3. Hands-On Exercise:
- Troubleshoot a predefined issue
- Enable/Disable an Apache module and observe the effects
4. Q&A and Wrap-Up (20 minutes)
- Review Key Points:
- Summarize the main commands and configurations covered
- Open Floor:
- Answer any remaining questions
- Feedback:
- Collect feedback on the session