Two servers and one PC Step 1

📦 PHP
✨ The Prompt Phrase
This guide explains how to run two PHP servers on the same PC: XAMPP and Laragon. XAMPP will be modified while Laragon remains on default settings.

To change the Apache XAMPP server configuration, open the control panel, click the Config button next to Apache, and select "httpd.conf" from the dropdown menu.See Image

💻 Code Preview

📦 All-in-One Code
<img src="DB_IMAGE" alt="Prompt Image" style="max-width:100%;">

</br>
</br>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Two Servers and One PC Step 1 - Interactive Tutorial</title>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&family=Fira+Code:wght@400;600&display=swap');

        :root {
            --primary: #667eea;
            --secondary: #764ba2;
            --accent: #f093fb;
            --success: #4ade80;
            --warning: #fbbf24;
            --danger: #f87171;
            --info: #3b82f6;
            --dark: #1a1a2e;
            --darker: #0f0f1e;
            --light: #eaeaea;
            --glass: rgba(255, 255, 255, 0.1);
            --glass-border: rgba(255, 255, 255, 0.2);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: 'Poppins', sans-serif;
            background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
            color: var(--light);
            line-height: 1.6;
            overflow-x: hidden;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        /* Progress Bar */
        .progress-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 5px;
            background: rgba(0, 0, 0, 0.3);
            z-index: 1000;
        }

        .progress-bar {
            height: 100%;
            background: linear-gradient(90deg, var(--primary), var(--accent));
            width: 0%;
            transition: width 0.3s ease;
            box-shadow: 0 0 10px var(--accent);
        }

        /* Hero Section */
        .hero {
            text-align: center;
            padding: 100px 20px 80px;
            position: relative;
            z-index: 1;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
            opacity: 0.15;
            animation: rotate 30s linear infinite;
        }

        @keyframes rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .hero-badge {
            display: inline-block;
            padding: 8px 20px;
            background: var(--glass);
            backdrop-filter: blur(10px);
            border: 2px solid var(--glass-border);
            border-radius: 50px;
            font-size: 0.9rem;
            margin-bottom: 20px;
            animation: fadeInDown 1s ease;
        }

        .hero h1 {
            font-size: clamp(2rem, 5vw, 3.5rem);
            font-weight: 800;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 20px;
            animation: fadeInDown 1s ease 0.2s backwards;
            line-height: 1.2;
        }

        .hero-subtitle {
            font-size: clamp(1rem, 2vw, 1.3rem);
            opacity: 0.8;
            margin-bottom: 40px;
            animation: fadeInUp 1s ease 0.4s backwards;
        }

        .server-visual {
            display: flex;
            justify-content: center;
            gap: 30px;
            margin: 40px 0;
            flex-wrap: wrap;
            animation: fadeIn 1s ease 0.6s backwards;
        }

        .server-box {
            background: var(--glass);
            backdrop-filter: blur(10px);
            border: 2px solid var(--glass-border);
            border-radius: 20px;
            padding: 30px;
            min-width: 250px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            transition: all 0.3s ease;
            position: relative;
        }

        .server-box:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 50px rgba(102, 126, 234, 0.5);
        }

        .server-box.xampp {
            border-color: var(--warning);
        }

        .server-box.laragon {
            border-color: var(--info);
        }

        .server-icon {
            font-size: 4rem;
            margin-bottom: 15px;
            display: block;
        }

        .server-box h3 {
            color: var(--accent);
            margin-bottom: 10px;
            font-size: 1.5rem;
        }

        .server-status {
            display: inline-block;
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
            margin-top: 10px;
        }

        .status-modified {
            background: rgba(251, 191, 36, 0.2);
            color: var(--warning);
            border: 2px solid var(--warning);
        }

        .status-default {
            background: rgba(59, 130, 246, 0.2);
            color: var(--info);
            border: 2px solid var(--info);
        }

        /* Section Styles */
        .section {
            background: var(--glass);
            backdrop-filter: blur(10px);
            border: 1px solid var(--glass-border);
            border-radius: 20px;
            padding: 40px;
            margin: 40px 0;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            animation: fadeInUp 0.8s ease;
            position: relative;
            z-index: 1;
        }

        .section h2 {
            font-size: clamp(1.8rem, 4vw, 2.5rem);
            margin-bottom: 25px;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            display: flex;
            align-items: center;
            gap: 15px;
            flex-wrap: wrap;
        }

        .section p {
            font-size: clamp(1rem, 2vw, 1.1rem);
            margin-bottom: 15px;
            opacity: 0.9;
            line-height: 1.8;
        }

        /* Screenshot Display */
        .screenshot-container {
            background: rgba(0, 0, 0, 0.3);
            border-radius: 15px;
            padding: 20px;
            margin: 25px 0;
            border: 2px solid var(--primary);
        }

        .screenshot-img {
            width: 100%;
            max-width: 700px;
            border-radius: 10px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            margin: 20px auto;
            display: block;
            cursor: pointer;
            transition: transform 0.3s ease;
        }

        .screenshot-img:hover {
            transform: scale(1.02);
        }

        .screenshot-caption {
            text-align: center;
            color: var(--accent);
            font-weight: 600;
            margin-top: 15px;
            font-size: 1.1rem;
        }

        /* Accordion */
        .accordion {
            margin: 20px 0;
        }

        .accordion-item {
            background: rgba(102, 126, 234, 0.1);
            border: 2px solid var(--primary);
            border-radius: 15px;
            margin: 15px 0;
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .accordion-header {
            padding: 20px;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: 600;
            font-size: 1.1rem;
            transition: background 0.3s ease;
        }

        .accordion-header:hover {
            background: rgba(102, 126, 234, 0.2);
        }

        .accordion-icon {
            transition: transform 0.3s ease;
            font-size: 1.5rem;
        }

        .accordion-item.active .accordion-icon {
            transform: rotate(180deg);
        }

        .accordion-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
            padding: 0 20px;
        }

        .accordion-item.active .accordion-content {
            max-height: 2000px;
            padding: 20px;
        }

        /* Step Cards */
        .steps-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
            margin: 30px 0;
        }

        .step-card {
            background: rgba(102, 126, 234, 0.1);
            border: 2px solid var(--primary);
            border-radius: 15px;
            padding: 25px;
            transition: all 0.3s ease;
            position: relative;
        }

        .step-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
            border-color: var(--accent);
        }

        .step-number {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            border-radius: 50%;
            font-weight: 700;
            font-size: 1.5rem;
            margin-bottom: 15px;
        }

        /* Config Path Visual */
        .config-path {
            background: rgba(0, 0, 0, 0.3);
            border-radius: 15px;
            padding: 25px;
            margin: 25px 0;
            border-left: 4px solid var(--warning);
        }

        .path-step {
            display: flex;
            align-items: center;
            gap: 15px;
            margin: 15px 0;
            padding: 15px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            transition: all 0.3s ease;
        }

        .path-step:hover {
            background: rgba(102, 126, 234, 0.2);
            transform: translateX(10px);
        }

        .path-arrow {
            font-size: 2rem;
            color: var(--accent);
        }

        .path-label {
            font-family: 'Fira Code', monospace;
            color: var(--warning);
            font-weight: 600;
            font-size: 1.1rem;
        }

        /* Tabs */
        .tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .tab-btn {
            padding: 12px 24px;
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid var(--glass-border);
            border-radius: 10px;
            color: var(--light);
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .tab-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: var(--primary);
        }

        .tab-btn.active {
            background: linear-gradient(135deg, var(--primary), var(--accent));
            border-color: var(--accent);
        }

        .tab-content {
            display: none;
            animation: fadeIn 0.5s ease;
        }

        .tab-content.active {
            display: block;
        }

        /* Quiz */
        .quiz-container {
            background: rgba(102, 126, 234, 0.1);
            border-radius: 20px;
            padding: 40px;
            margin: 30px 0;
            border: 2px solid var(--primary);
        }

        .quiz-question {
            background: rgba(0, 0, 0, 0.3);
            border-radius: 15px;
            padding: 30px;
            margin: 25px 0;
        }

        .quiz-question h4 {
            color: var(--accent);
            margin-bottom: 20px;
            font-size: 1.2rem;
        }

        .quiz-option {
            padding: 18px 24px;
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid var(--glass-border);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            margin: 10px 0;
        }

        .quiz-option:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: var(--primary);
            transform: translateX(5px);
        }

        .quiz-option.correct {
            background: rgba(74, 222, 128, 0.2);
            border-color: var(--success);
            animation: correctAnswer 0.5s ease;
        }

        .quiz-option.incorrect {
            background: rgba(248, 113, 113, 0.2);
            border-color: var(--danger);
            animation: shake 0.5s ease;
        }

        @keyframes correctAnswer {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-10px); }
            75% { transform: translateX(10px); }
        }

        .quiz-feedback {
            margin-top: 15px;
            padding: 15px;
            border-radius: 10px;
            font-weight: 600;
            display: none;
        }

        .quiz-feedback.show {
            display: block;
            animation: fadeIn 0.5s ease;
        }

        .quiz-score {
            text-align: center;
            font-size: 1.5rem;
            margin-top: 30px;
            padding: 20px;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            border-radius: 15px;
            font-weight: 700;
        }

        /* Cards */
        .tip-card {
            background: rgba(74, 222, 128, 0.1);
            border-left: 4px solid var(--success);
            border-radius: 10px;
            padding: 20px;
            margin: 15px 0;
        }

        .mistake-card {
            background: rgba(248, 113, 113, 0.1);
            border-left: 4px solid var(--danger);
            border-radius: 10px;
            padding: 20px;
            margin: 15px 0;
        }

        .info-card {
            background: rgba(59, 130, 246, 0.1);
            border-left: 4px solid var(--info);
            border-radius: 10px;
            padding: 20px;
            margin: 15px 0;
        }

        /* Summary */
        .summary-card {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            border-radius: 25px;
            padding: 50px;
            margin: 40px 0;
            box-shadow: 0 15px 50px rgba(102, 126, 234, 0.4);
        }

        .summary-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 25px;
            margin-top: 30px;
        }

        .summary-item {
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 25px;
            text-align: center;
        }

        .summary-item h4 {
            color: white;
            margin: 15px 0;
            font-size: 1.1rem;
        }

        .summary-item p {
            color: white;
            opacity: 0.9;
            font-size: 0.95rem;
        }

        /* Footer */
        .footer {
            text-align: center;
            padding: 60px 20px 40px;
            margin-top: 80px;
            border-top: 2px solid var(--glass-border);
        }

        .badge {
            display: inline-block;
            padding: 8px 18px;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            border-radius: 25px;
            font-size: 0.9rem;
            font-weight: 600;
            margin: 5px;
        }

        /* Tooltip */
        .tooltip {
            position: relative;
            display: inline-block;
            border-bottom: 2px dotted var(--accent);
            cursor: help;
        }

        .tooltip .tooltiptext {
            visibility: hidden;
            width: 250px;
            background: var(--darker);
            color: var(--light);
            text-align: center;
            border-radius: 10px;
            padding: 10px;
            position: absolute;
            z-index: 1;
            bottom: 125%;
            left: 50%;
            margin-left: -125px;
            opacity: 0;
            transition: opacity 0.3s;
            border: 2px solid var(--primary);
            font-size: 0.9rem;
        }

        .tooltip:hover .tooltiptext {
            visibility: visible;
            opacity: 1;
        }

        /* Animations */
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Confetti */
        .confetti {
            position: fixed;
            width: 10px;
            height: 10px;
            pointer-events: none;
            z-index: 9999;
            animation: confettiFall 3s ease-out forwards;
        }

        @keyframes confettiFall {
            to {
                transform: translateY(100vh) rotate(720deg);
                opacity: 0;
            }
        }

        /* Scroll Button */
        .scroll-top {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            opacity: 0;
            transition: all 0.3s ease;
            z-index: 999;
            font-size: 1.5rem;
        }

        .scroll-top.show {
            opacity: 1;
        }

        .scroll-top:hover {
            transform: scale(1.1);
        }

        /* Copy Button */
        .copy-btn {
            padding: 8px 16px;
            background: var(--primary);
            border: none;
            border-radius: 8px;
            color: white;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.85rem;
            transition: all 0.3s ease;
            margin-left: 10px;
        }

        .copy-btn:hover {
            background: var(--accent);
            transform: scale(1.05);
        }

        .copy-btn.copied {
            background: var(--success);
        }

        /* Responsive */
        @media (max-width: 768px) {
            .hero {
                padding: 80px 20px 60px;
            }

            .section {
                padding: 25px;
            }

            .summary-card {
                padding: 30px 20px;
            }

            .server-visual {
                flex-direction: column;
                align-items: center;
            }

            .path-step {
                flex-direction: column;
                text-align: center;
            }
        }
    </style>
</head>
<body>
    <!-- Progress Bar -->
    <div class="progress-container">
        <div class="progress-bar" id="progressBar"></div>
    </div>

    <!-- Scroll to Top -->
    <div class="scroll-top" id="scrollTop" onclick="scrollToTop()">↑</div>

    <div class="container">
        <!-- Hero Section -->
        <section class="hero">
            <div class="hero-badge">🖥️ Dual Server Setup - Step 1</div>
            <h1>Running Two PHP Servers on One PC</h1>
            <p class="hero-subtitle">Master the art of configuring XAMPP and Laragon to work together harmoniously!</p>
            
            <div class="server-visual">
                <div class="server-box xampp">
                    <span class="server-icon">🟠</span>
                    <h3>XAMPP</h3>
                    <p>Apache + MySQL + PHP</p>
                    <span class="server-status status-modified">⚙️ Will be Modified</span>
                </div>
                <div class="server-box laragon">
                    <span class="server-icon">🔵</span>
                    <h3>Laragon</h3>
                    <p>Apache + MySQL + PHP</p>
                    <span class="server-status status-default">✨ Default Settings</span>
                </div>
            </div>
        </section>

        <!-- What Is It Section -->
        <section class="section">
            <h2>🤔 What Is This About?</h2>
            <p>
                Imagine you want to run two different <span class="tooltip"><strong>PHP development environments</strong><span class="tooltiptext">Software bundles that include Apache server, MySQL database, and PHP interpreter</span></span> on the same computer. It's like having two kitchens in one house - they can both cook, but they need different stoves!
            </p>
            <div class="info-card">
                <h4 style="color: var(--info); margin-bottom: 10px;">🎯 The Challenge</h4>
                <p>Both XAMPP and Laragon want to use the same "doors" (ports) to serve websites. By default, they both try to use port 80 for Apache and port 8080 for other services. This creates a conflict - like two people trying to walk through the same door at once! 🚪</p>
            </div>
            <p>
                The solution? We'll modify XAMPP's configuration to use different ports while keeping Laragon on its default settings. This way, both servers can run simultaneously without fighting over resources!
            </p>

            <div class="info-card" style="margin-top: 30px;">
                <h4 style="color: var(--info); margin-bottom: 10px;">📋 What We're Doing</h4>
                <ul style="line-height: 2; margin-top: 15px;">
                    <li>🟠 <strong>XAMPP:</strong> Will be configured with custom ports (modified)</li>
                    <li>🔵 <strong>Laragon:</strong> Stays on default ports (80, 3306, etc.)</li>
                    <li>🎯 <strong>Goal:</strong> Both servers running peacefully side by side</li>
                    <li>⚙️ <strong>Method:</strong> Edit XAMPP's httpd.conf file</li>
                </ul>
            </div>
        </section>

        <!-- Why Use It Section -->
        <section class="section">
            <h2>🌟 Why Run Two Servers?</h2>
            
            <div class="steps-container">
                <div class="step-card">
                    <div class="step-number">🔬</div>
                    <h4>Testing Different Versions</h4>
                    <p>Test your projects on different PHP versions or server configurations!</p>
                </div>
                <div class="step-card">
                    <div class="step-number">🎓</div>
                    <h4>Learning & Comparison</h4>
                    <p>Compare how different servers handle the same code!</p>
                </div>
                <div class="step-card">
                    <div class="step-number">🛠️</div>
                    <h4>Project Separation</h4>
                    <p>Keep legacy projects on one server, new projects on another!</p>
                </div>
                <div class="step-card">
                    <div class="step-number">🔄</div>
                    <h4>Migration Testing</h4>
                    <p>Test migration from one environment to another safely!</p>
                </div>
            </div>
        </section>

        <!-- How It Works Section -->
        <section class="section">
            <h2>⚙️ Step-by-Step Configuration</h2>
            <p>Let's walk through the exact process of accessing XAMPP's Apache configuration:</p>
            
            <div class="config-path">
                <h3 style="color: var(--warning); margin-bottom: 20px;">📍 Navigation Path</h3>
                <div class="path-step">
                    <span class="path-arrow">1️⃣</span>
                    <div>
                        <div class="path-label">Open XAMPP Control Panel</div>
                        <p style="margin-top: 5px; opacity: 0.8;">Launch the XAMPP Control Panel application</p>
                    </div>
                </div>
                <div class="path-step">
                    <span class="path-arrow">2️⃣</span>
                    <div>
                        <div class="path-label">Locate Apache Module</div>
                        <p style="margin-top: 5px; opacity: 0.8;">Find the Apache row in the modules list</p>
                    </div>
                </div>
                <div class="path-step">
                    <span class="path-arrow">3️⃣</span>
                    <div>
                        <div class="path-label">Click "Config" Button</div>
                        <p style="margin-top: 5px; opacity: 0.8;">Click the Config button next to Apache</p>
                    </div>
                </div>
                <div class="path-step">
                    <span class="path-arrow">4️⃣</span>
                    <div>
                        <div class="path-label">Select "httpd.conf"</div>
                        <p style="margin-top: 5px; opacity: 0.8;">Choose httpd.conf from the dropdown menu</p>
                    </div>
                </div>
            </div>

            <div class="accordion" style="margin-top: 30px;">
                <div class="accordion-item">
                    <div class="accordion-header" onclick="toggleAccordion(this)">
                        <span>Detailed Step 1: Open XAMPP Control Panel</span>
                        <span class="accordion-icon">▼</span>
                    </div>
                    <div class="accordion-content">
                        <p>Launch the XAMPP Control Panel from your Start Menu or desktop shortcut. You should see a window with several modules listed: Apache, MySQL, FileZilla, Mercury, and Tomcat.</p>
                        <div class="tip-card" style="margin-top: 15px;">
                            <p>💡 <strong>Tip:</strong> If you don't see the Control Panel, search for "XAMPP Control Panel" in Windows search or look in C:\xampp\xampp-control.exe</p>
                        </div>
                    </div>
                </div>

                <div class="accordion-item">
                    <div class="accordion-header" onclick="toggleAccordion(this)">
                        <span>Detailed Step 2: Find the Apache Module</span>
                        <span class="accordion-icon">▼</span>
                    </div>
                    <div class="accordion-content">
                        <p>In the Control Panel, Apache is typically the first module in the list. You'll see several columns:</p>
                        <ul style="margin: 15px 0; line-height: 2;">
                            <li><strong>Module:</strong> Shows "Apache"</li>
                            <li><strong>PID(s):</strong> Process IDs (if running)</li>
                            <li><strong>Port(s):</strong> Shows ports like 80, 443, 8080</li>
                            <li><strong>Actions:</strong> Start/Stop buttons</li>
                        </ul>
                    </div>
                </div>

                <div class="accordion-item">
                    <div class="accordion-header" onclick="toggleAccordion(this)">
                        <span>Detailed Step 3: Click the Config Button</span>
                        <span class="accordion-icon">▼</span>
                    </div>
                    <div class="accordion-content">
                        <p>Look for the "Config" button in the Apache row. It's usually located between the "Logs" and "Admin" buttons. When you click it, a dropdown menu will appear.</p>
                        <div class="info-card" style="margin-top: 15px;">
                            <p>📋 The Config dropdown shows several configuration files you can edit. For now, we're focusing on <strong>httpd.conf</strong>, which is the main Apache configuration file.</p>
                        </div>
                    </div>
                </div>

                <div class="accordion-item">
                    <div class="accordion-header" onclick="toggleAccordion(this)">
                        <span>Detailed Step 4: Select httpd.conf</span>
                        <span class="accordion-icon">▼</span>
                    </div>
                    <div class="accordion-content">
                        <p>From the dropdown menu, you'll see options like:</p>
                        <ul style="margin: 15px 0; line-height: 2;">
                            <li>✅ <strong>Apache (httpd.conf)</strong> ← Select this one!</li>
                            <li>Apache (httpd-ssl.conf)</li>
                            <li>Apache (httpd-xampp.conf)</li>
                            <li>PHP (php.ini)</li>
                            <li>phpMyAdmin (config.inc.php)</li>
                        </ul>
                        <p>Clicking on "Apache (httpd.conf)" will open the file in your default text editor (usually Notepad).</p>
                    </div>
                </div>
            </div>
        </section>

        <!-- Visual Guide Section -->
        <section class="section">
            <h2>📸 Visual Guide</h2>
            <p>Here's what the XAMPP Control Panel looks like when you access the Config menu:</p>
            
            <div class="screenshot-container">
                <img src="https://d41chssnpqdne.cloudfront.net/user_upload_by_module/chat_bot/files/26769899/LCzQEgRSs8N6KQ7L.png?Expires=1771018579&Signature=lO0dLJEjW6aGpyLCP2PXL3bchkWUorryu~COx4xL~IU3okMSn4H4WK8tkY-WC-o8zYPXwe6oNx9p0Qb8Diqz87UOGBepjEJhtP298H1JibNnEWTA~ykZBsQ9zMOx2bxJ2TDshL6t2~bovoHSaARgZuKBVuG2PpIgzceLKRO8JGndGtoTbAHGfCs~3kBG0OQULTRlpCjJv0FBmt6G5rYV87G09RsDsIdXoAy279qrfU6DotZw-W1wFpx8HAUJJvjLN5HycOibp3aosKLZJm2PN1yU5M0wgM3hZaJDePWH-HA2SYS64GXRF0acg7h2IoxSAQ7G5gA81ZbE8-0o8ocYmg__&Key-Pair-Id=K3USGZIKWMDCSX" alt="XAMPP Control Panel Config Menu" class="screenshot-img" onclick="this.style.transform = this.style.transform === 'scale(1.5)' ? 'scale(1)' : 'scale(1.5)'">
                <p class="screenshot-caption">🖼️ XAMPP Control Panel showing the Config dropdown menu</p>
            </div>

            <div class="info-card" style="margin-top: 25px;">
                <h4 style="color: var(--info); margin-bottom: 15px;">🔍 What You See in the Image:</h4>
                <ul style="line-height: 2;">
                    <li>🟢 <strong>Apache Module:</strong> Running on ports 4443 and 8080</li>
                    <li>🟢 <strong>MySQL Module:</strong> Running on port 3306</li>
                    <li>⚙️ <strong>Config Button:</strong> Visible next to Apache with dropdown menu</li>
                    <li>📋 <strong>Menu Options:</strong> Shows various configuration files</li>
                    <li>⚠️ <strong>Port Conflict:</strong> Notice the error message about port 8080 being in use!</li>
                </ul>
            </div>

            <div class="mistake-card" style="margin-top: 20px;">
                <h4 style="color: var(--danger); margin-bottom: 10px;">⚠️ Notice the Error Message</h4>
                <p>The screenshot shows a common problem: "Port 8080 in use by C:\xampp\apache\bin\httpd.exe!" This is exactly why we need to modify the configuration - to avoid port conflicts!</p>
            </div>
        </section>

        <!-- Understanding the Files Section -->
        <section class="section">
            <h2>📂 Understanding Configuration Files</h2>
            
            <div class="tabs">
                <button class="tab-btn active" onclick="switchTab(0)">httpd.conf</button>
                <button class="tab-btn" onclick="switchTab(1)">httpd-ssl.conf</button>
                <button class="tab-btn" onclick="switchTab(2)">httpd-xampp.conf</button>
            </div>

            <div class="tab-content active" id="tab0">
                <div class="info-card">
                    <h4 style="color: var(--info); margin-bottom: 15px;">📄 httpd.conf - Main Configuration File</h4>
                    <p><strong>Purpose:</strong> This is Apache's primary configuration file. It controls:</p>
                    <ul style="margin: 15px 0; line-height: 2;">
                        <li>🔌 <strong>Port Settings:</strong> Which ports Apache listens on (default: 80, 443)</li>
                        <li>📁 <strong>Document Root:</strong> Where your website files are stored</li>
                        <li>⚙️ <strong>Server Settings:</strong> Timeout, max connections, etc.</li>
                        <li>📦 <strong>Modules:</strong> Which Apache modules to load</li>
                        <li>🔒 <strong>Security:</strong> Access controls and permissions</li>
                    </ul>
                    <p style="margin-top: 15px;"><strong>Location:</strong> <code style="background: rgba(0,0,0,0.3); padding: 3px 8px; border-radius: 5px;">C:\xampp\apache\conf\httpd.conf</code></p>
                </div>
            </div>

            <div class="tab-content" id="tab1">
                <div class="info-card">
                    <h4 style="color: var(--info); margin-bottom: 15px;">🔒 httpd-ssl.conf - SSL/HTTPS Configuration</h4>
                    <p><strong>Purpose:</strong> Handles secure HTTPS connections:</p>
                    <ul style="margin: 15px 0; line-height: 2;">
                        <li>🔐 <strong>SSL Port:</strong> Usually port 443 for HTTPS</li>
                        <li>📜 <strong>Certificates:</strong> SSL certificate locations</li>
                        <li>🔑 <strong>Encryption:</strong> SSL/TLS protocol settings</li>
                        <li>🛡️ <strong>Security:</strong> Cipher suites and security policies</li>
                    </ul>
                    <p style="margin-top: 15px;"><strong>When to edit:</strong> When setting up HTTPS or changing SSL port</p>
                </div>
            </div>

            <div class="tab-content" id="tab2">
                <div class="info-card">
                    <h4 style="color: var(--info); margin-bottom: 15px;">🎯 httpd-xampp.conf - XAMPP-Specific Settings</h4>
                    <p><strong>Purpose:</strong> XAMPP's custom configurations:</p>
                    <ul style="margin: 15px 0; line-height: 2;">
                        <li>🗄️ <strong>phpMyAdmin:</strong> Database admin tool settings</li>
                        <li>📊 <strong>Status Pages:</strong> Server status and info pages</li>
                        <li>🔧 <strong>XAMPP Tools:</strong> Configurations for XAMPP utilities</li>
                        <li>🌐 <strong>Virtual Hosts:</strong> Additional XAMPP-specific hosts</li>
                    </ul>
                    <p style="margin-top: 15px;"><strong>When to edit:</strong> When customizing XAMPP-specific features</p>
                </div>
            </div>
        </section>

        <!-- Common Mistakes Section -->
        <section class="section">
            <h2>⚠️ Common Mistakes</h2>
            
            <div class="mistake-card">
                <h4 style="color: var(--danger); margin-bottom: 10px;">❌ Editing the Wrong File</h4>
                <p><strong>Problem:</strong> Opening httpd-ssl.conf or httpd-xampp.conf instead of httpd.conf</p>
                <p><strong>Result:</strong> Your port changes won't take effect!</p>
                <p><strong>Fix:</strong> Always select "Apache (httpd.conf)" from the dropdown - it's the main file!</p>
            </div>

            <div class="mistake-card">
                <h4 style="color: var(--danger); margin-bottom: 10px;">❌ Not Stopping Apache First</h4>
                <p><strong>Problem:</strong> Editing config files while Apache is running</p>
                <p><strong>Result:</strong> Changes won't apply until you restart, and you might lose changes!</p>
                <p><strong>Fix:</strong> Always click "Stop" on Apache before editing configuration files!</p>
            </div>

            <div class="mistake-card">
                <h4 style="color: var(--danger); margin-bottom: 10px;">❌ Forgetting to Save</h4>
                <p><strong>Problem:</strong> Making changes but closing without saving</p>
                <p><strong>Result:</strong> All your configuration changes are lost!</p>
                <p><strong>Fix:</strong> Always press Ctrl+S or File → Save before closing the editor!</p>
            </div>

            <div class="mistake-card">
                <h4 style="color: var(--danger); margin-bottom: 10px;">❌ Syntax Errors in Config</h4>
                <p><strong>Problem:</strong> Accidentally deleting important characters or lines</p>
                <p><strong>Result:</strong> Apache won't start and shows cryptic error messages!</p>
                <p><strong>Fix:</strong> Make a backup copy of httpd.conf before editing (File → Save As → httpd.conf.backup)</p>
            </div>
        </section>

        <!-- Pro Tips Section -->
        <section class="section">
            <h2>🚀 Pro Tips</h2>
            
            <div class="tip-card">
                <h4 style="color: var(--success); margin-bottom: 10px;">💎 Always Make a Backup First</h4>
                <p>Before editing any configuration file, create a backup:</p>
                <ol style="margin-top: 10px; line-height: 2;">
                    <li>Open httpd.conf</li>
                    <li>Click File → Save As</li>
                    <li>Save as "httpd.conf.backup"</li>
                    <li>Now edit the original safely!</li>
                </ol>
                <p style="margin-top: 10px;">If something goes wrong, you can always restore from backup! 🛟</p>
            </div>

            <div class="tip-card">
                <h4 style="color: var(--success); margin-bottom: 10px;">💎 Use a Better Text Editor</h4>
                <p>Instead of Notepad, use a code editor with syntax highlighting:</p>
                <ul style="margin-top: 10px; line-height: 2;">
                    <li>📝 <strong>Notepad++</strong> - Free, lightweight, perfect for config files</li>
                    <li>💻 <strong>VS Code</strong> - Professional, with Apache syntax support</li>
                    <li>⚡ <strong>Sublime Text</strong> - Fast and powerful</li>
                </ul>
                <p style="margin-top: 10px;">These editors show line numbers and highlight syntax errors!</p>
            </div>

            <div class="tip-card">
                <h4 style="color: var(--success); margin-bottom: 10px;">💎 Check Apache Error Logs</h4>
                <p>If Apache won't start after changes, check the error log:</p>
                <p style="margin-top: 10px;">Click "Logs" button → "Apache (error.log)" to see what went wrong!</p>
                <p>The error log will tell you exactly which line has a problem. 🔍</p>
            </div>

            <div class="tip-card">
                <h4 style="color: var(--success); margin-bottom: 10px;">💎 Use Comments to Mark Changes</h4>
                <p>When editing httpd.conf, add comments to track your changes:</p>
                <div style="background: rgba(0,0,0,0.3); padding: 15px; border-radius: 10px; margin-top: 10px; font-family: 'Fira Code', monospace; font-size: 0.9rem;">
# Modified by [Your Name] on [Date]<br>
# Changed port from 80 to 8888 for dual server setup<br>
Listen 8888
                </div>
                <p style="margin-top: 10px;">This helps you remember what you changed and why! 📝</p>
            </div>

            <div class="tip-card">
                <h4 style="color: var(--success); margin-bottom: 10px;">💎 Test Configuration Before Restarting</h4>
                <p>XAMPP has a built-in config test feature:</p>
                <ol style="margin-top: 10px; line-height: 2;">
                    <li>Save your changes to httpd.conf</li>
                    <li>Open Command Prompt as Administrator</li>
                    <li>Navigate to: <code style="background: rgba(0,0,0,0.3); padding: 3px 8px; border-radius: 5px;">C:\xampp\apache\bin</code></li>
                    <li>Run: <code style="background: rgba(0,0,0,0.3); padding: 3px 8px; border-radius: 5px;">httpd.exe -t</code></li>
                </ol>
                <p style="margin-top: 10px;">This tests your configuration without starting Apache! ✅</p>
            </div>

            <div class="tip-card">
                <h4 style="color: var(--success); margin-bottom: 10px;">💎 Document Your Port Assignments</h4>
                <p>Keep a note of which ports you're using:</p>
                <div style="background: rgba(0,0,0,0.3); padding: 15px; border-radius: 10px; margin-top: 10px;">
                    <strong>XAMPP Ports:</strong><br>
                    • Apache HTTP: 8888<br>
                    • Apache HTTPS: 4443<br>
                    • MySQL: 3307<br>
                    <br>
                    <strong>Laragon Ports:</strong><br>
                    • Apache HTTP: 80<br>
                    • Apache HTTPS: 443<br>
                    • MySQL: 3306
                </div>
                <p style="margin-top: 10px;">This prevents confusion when accessing your projects! 🗂️</p>
            </div>
        </section>

        <!-- Quiz Section -->
        <section class="section">
            <h2>🎯 Knowledge Check</h2>
            <p>Test your understanding of XAMPP configuration!</p>
            
            <div class="quiz-container">
                <div class="quiz-question">
                    <h4>Question 1: Which file should you edit to change Apache's main port settings?</h4>
                    <div class="quiz-option" onclick="checkAnswer(this, false, 0)">A) httpd-ssl.conf</div>
                    <div class="quiz-option" onclick="checkAnswer(this, true, 0)">B) httpd.conf</div>
                    <div class="quiz-option" onclick="checkAnswer(this, false, 0)">C) httpd-xampp.conf</div>
                    <div class="quiz-option" onclick="checkAnswer(this, false, 0)">D) php.ini</div>
                    <div class="quiz-feedback" id="feedback0"></div>
                </div>

                <div class="quiz-question">
                    <h4>Question 2: Where do you find the Config button in XAMPP Control Panel?</h4>
                    <div class="quiz-option" onclick="checkAnswer(this, false, 1)">A) In the top menu bar</div>
                    <div class="quiz-option" onclick="checkAnswer(this, true, 1)">B) Next to the Apache module in the Actions column</div>
                    <div class="quiz-option" onclick="checkAnswer(this, false, 1)">C) In the MySQL row</div>
                    <div class="quiz-option" onclick="checkAnswer(this, false, 1)">D) At the bottom of the window</div>
                    <div class="quiz-feedback" id="feedback1"></div>
                </div>

                <div class="quiz-question">
                    <h4>Question 3: What should you do BEFORE editing Apache configuration files?</h4>
                    <div class="quiz-option" onclick="checkAnswer(this, false, 2)">A) Restart your computer</div>
                    <div class="quiz-option" onclick="checkAnswer(this, false, 2)">B) Uninstall Laragon</div>
                    <div class="quiz-option" onclick="checkAnswer(this, true, 2)">C) Stop Apache and make a backup of the config file</div>
                    <div class="quiz-option" onclick="checkAnswer(this, false, 2)">D) Delete all your projects</div>
                    <div class="quiz-feedback" id="feedback2"></div>
                </div>

                <div class="quiz-score" id="quizScore" style="display: none;">
                    🎉 You scored <span id="scoreValue">0</span>/3! <span id="scoreMessage"></span>
                </div>
            </div>
        </section>

        <!-- Summary Card -->
        <section class="summary-card">
            <h2 style="color: white; text-align: center; margin-bottom: 40px;">📚 Quick Reference - Step 1</h2>
            <div class="summary-grid">
                <div class="summary-item">
                    <div style="font-size: 3rem;">1️⃣</div>
                    <h4>Open Control Panel</h4>
                    <p>Launch XAMPP Control Panel</p>
                </div>
                <div class="summary-item">
                    <div style="font-size: 3rem;">2️⃣</div>
                    <h4>Find Apache</h4>
                    <p>Locate Apache in the modules list</p>
                </div>
                <div class="summary-item">
                    <div style="font-size: 3rem;">3️⃣</div>
                    <h4>Click Config</h4>
                    <p>Click Config button next to Apache</p>
                </div>
                <div class="summary-item">
                    <div style="font-size: 3rem;">4️⃣</div>
                    <h4>Select httpd.conf</h4>
                    <p>Choose httpd.conf from dropdown</p>
                </div>
            </div>

            <div style="margin-top: 40px; padding: 25px; background: rgba(0,0,0,0.3); border-radius: 15px;">
                <h3 style="color: white; margin-bottom: 20px; text-align: center;">🔑 Key Takeaways</h3>
                <ul style="color: white; line-height: 2; font-size: 1.05rem;">
                    <li>✅ httpd.conf is the main Apache configuration file</li>
                    <li>✅ Always make a backup before editing</li>
                    <li>✅ Stop Apache before making changes</li>
                    <li>✅ The Config button is next to each module</li>
                    <li>✅ Save your changes before closing the editor</li>
                    <li>✅ Check error logs if Apache won't start</li>
                </ul>
            </div>

            <div style="margin-top: 30px; text-align: center;">
                <p style="color: white; font-size: 1.2rem; margin-bottom: 15px;">🎯 Next Step: Edit Port Settings</p>
                <p style="color: white; opacity: 0.8;">In the next tutorial, we'll modify the actual port numbers in httpd.conf to avoid conflicts with Laragon!</p>
            </div>
        </section>

        <!-- Footer -->
        <footer class="footer">
            <h3 style="background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent;">🎉 Step 1 Complete!</h3>
            <p style="margin: 20px 0;">You now know how to access XAMPP's Apache configuration files!</p>
            <div>
                <div class="badge">🖥️ XAMPP</div>
                <div class="badge">🔵 Laragon</div>
                <div class="badge">⚙️ Configuration</div>
                <div class="badge">🔌 Port Management</div>
                <div class="badge">🛠️ Apache</div>
            </div>
            <p style="margin-top: 30px; opacity: 0.7;">
                📖 Generated by <strong>AI Prompt Dictionary</strong>
            </p>
            <p style="font-size: 0.9rem; opacity: 0.6; margin-top: 10px;">
                © 2026 Interactive Tutorial System
            </p>
        </footer>
    </div>

    <script>
        // Progress Bar
        window.addEventListener('scroll', () => {
            const winScroll = document.body.scrollTop || document.documentElement.scrollTop;
            const height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
            const scrolled = (winScroll / height) * 100;
            document.getElementById('progressBar').style.width = scrolled + '%';
        });

        // Scroll to Top
        window.addEventListener('scroll', () => {
            const scrollTop = document.getElementById('scrollTop');
            if (window.scrollY > 300) {
                scrollTop.classList.add('show');
            } else {
                scrollTop.classList.remove('show');
            }
        });

        function scrollToTop() {
            window.scrollTo({ top: 0, behavior: 'smooth' });
        }

        // Accordion
        function toggleAccordion(header) {
            const item = header.parentElement;
            const wasActive = item.classList.contains('active');
            
            document.querySelectorAll('.accordion-item').forEach(el => {
                el.classList.remove('active');
            });
            
            if (!wasActive) {
                item.classList.add('active');
            }
        }

        // Tabs
        function switchTab(index) {
            document.querySelectorAll('.tab-btn').forEach((btn, i) => {
                btn.classList.toggle('active', i === index);
            });
            
            document.querySelectorAll('.tab-content').forEach((content, i) => {
                content.classList.toggle('active', i === index);
            });
        }

        // Quiz
        let quizScore = 0;
        let questionsAnswered = 0;

        function checkAnswer(element, isCorrect, questionIndex) {
            const options = element.parentElement.querySelectorAll('.quiz-option');
            options.forEach(opt => opt.style.pointerEvents = 'none');
            
            const feedback = document.getElementById('feedback' + questionIndex);
            
            if (isCorrect) {
                element.classList.add('correct');
                feedback.style.background = 'rgba(74, 222, 128, 0.2)';
                feedback.style.color = 'var(--success)';
                feedback.textContent = '🎉 Perfect! You got it right!';
                quizScore++;
                createConfetti();
            } else {
                element.classList.add('incorrect');
                feedback.style.background = 'rgba(248, 113, 113, 0.2)';
                feedback.style.color = 'var(--danger)';
                feedback.textContent = '❌ Not quite. Review the sections above!';
            }
            
            feedback.classList.add('show');
            questionsAnswered++;
            
            if (questionsAnswered === 3) {
                setTimeout(showFinalScore, 1000);
            }
        }

        function showFinalScore() {
            const scoreDiv = document.getElementById('quizScore');
            const scoreValue = document.getElementById('scoreValue');
            const scoreMessage = document.getElementById('scoreMessage');
            
            scoreValue.textContent = quizScore;
            
            if (quizScore === 3) {
                scoreMessage.textContent = 'Perfect! You\'re ready for Step 2! 🏆';
                createConfetti();
            } else if (quizScore === 2) {
                scoreMessage.textContent = 'Great job! Almost there! 🌟';
            } else {
                scoreMessage.textContent = 'Keep learning! Review and try again! 💪';
            }
            
            scoreDiv.style.display = 'block';
        }

        // Confetti Effect
        function createConfetti() {
            for (let i = 0; i < 50; i++) {
                const confetti = document.createElement('div');
                confetti.className = 'confetti';
                confetti.style.left = Math.random() * window.innerWidth + 'px';
                confetti.style.background = ['#667eea', '#f093fb', '#4ade80', '#fbbf24'][Math.floor(Math.random() * 4)];
                confetti.style.animationDelay = Math.random() * 0.5 + 's';
                document.body.appendChild(confetti);
                setTimeout(() => confetti.remove(), 3000);
            }
        }

        // Add entrance animations on scroll
        const observerOptions = {
            threshold: 0.1,
            rootMargin: '0px 0px -100px 0px'
        };

        const observer = new IntersectionObserver((entries) => {
            entries.forEach(entry => {
                if (entry.isIntersecting) {
                    entry.target.style.animation = 'fadeInUp 0.8s ease forwards';
                }
            });
        }, observerOptions);

        document.querySelectorAll('.section').forEach(section => {
            observer.observe(section);
        });
    </script>
</body>
</html>
Live Preview