Two servers and one PC Step 5

๐Ÿ“ฆ PHP
โœจ The Prompt Phrase
This guide is step Five in a series on running two PHP servers on the same PC: XAMPP and Laragon. XAMPP will be modified while Laragon remains on default settings.

Now return to Apache and select the config file. Refer to the image - we'll access this config file (httpd-ssl.conf), not the previous one.

In this file, change all instances of port 443 to 4443, including the listener configuration. Refer to the second part of the image and the explanation in the preview button for guidance.

๐Ÿ’ป Code Preview

๐Ÿ“ฆ All-in-One Code
<img src="DB_IMAGE" alt="Prompt Image" style="max-width:100%;">
```html
<!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 6 - 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;
            --ssl: #10b981;
            --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(--ssl), var(--success));
            width: 0%;
            transition: width 0.3s ease;
            box-shadow: 0 0 10px var(--ssl);
        }

        /* 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(--ssl) 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(--ssl), var(--success));
            -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;
        }

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

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

        .port-box.old {
            border-color: var(--danger);
            opacity: 0.6;
        }

        .port-box.old::after {
            content: 'โŒ';
            position: absolute;
            top: -15px;
            right: -15px;
            font-size: 2rem;
        }

        .port-box.new {
            border-color: var(--success);
            animation: pulse 2s infinite;
        }

        .port-box.new::after {
            content: 'โœ…';
            position: absolute;
            top: -15px;
            right: -15px;
            font-size: 2rem;
        }

        @keyframes pulse {
            0%, 100% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); }
            50% { box-shadow: 0 8px 32px rgba(16, 185, 129, 0.5); }
        }

        .arrow {
            font-size: 3rem;
            color: var(--ssl);
            animation: bounce 2s infinite;
        }

        @keyframes bounce {
            0%, 100% { transform: translateX(0); }
            50% { transform: translateX(10px); }
        }

        .port-number {
            font-size: 3rem;
            font-weight: 800;
            background: linear-gradient(135deg, var(--ssl), var(--success));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .ssl-icon {
            font-size: 4rem;
            margin-bottom: 15px;
        }

        /* 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(--ssl), var(--success));
            -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;
        }

        /* Code Editor Simulation */
        .code-editor {
            background: #1e1e1e;
            border-radius: 15px;
            padding: 20px;
            margin: 25px 0;
            border: 2px solid var(--ssl);
            position: relative;
            font-family: 'Fira Code', monospace;
        }

        .editor-header {
            display: flex;
            gap: 8px;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .editor-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
        }

        .dot-red { background: #ff5f56; }
        .dot-yellow { background: #ffbd2e; }
        .dot-green { background: #27c93f; }

        .editor-title {
            margin-left: 15px;
            color: rgba(255, 255, 255, 0.6);
            font-size: 0.9rem;
        }

        .code-line {
            margin: 8px 0;
            display: flex;
            align-items: center;
        }

        .line-number {
            color: rgba(255, 255, 255, 0.3);
            margin-right: 20px;
            min-width: 30px;
            text-align: right;
            user-select: none;
        }

        .code-content {
            flex: 1;
        }

        .keyword { color: #569cd6; }
        .property { color: #9cdcfe; }
        .number { color: #b5cea8; }
        .string { color: #ce9178; }
        .comment { color: #6a9955; }
        .tag { color: #4ec9b0; }
        
        .highlight-old { 
            background: rgba(248, 113, 113, 0.2);
            padding: 2px 6px;
            border-radius: 4px;
            text-decoration: line-through;
        }
        .highlight-new { 
            background: rgba(74, 222, 128, 0.2);
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
        }

        .copy-btn {
            position: absolute;
            top: 15px;
            right: 15px;
            padding: 8px 16px;
            background: var(--ssl);
            border: none;
            border-radius: 8px;
            color: white;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.85rem;
            transition: all 0.3s ease;
        }

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

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

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

        .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(--warning);
            font-weight: 600;
            margin-top: 15px;
            font-size: 1.1rem;
        }

        /* Change Counter */
        .change-counter {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin: 30px 0;
        }

        .counter-box {
            background: rgba(16, 185, 129, 0.1);
            border: 2px solid var(--ssl);
            border-radius: 15px;
            padding: 25px;
            text-align: center;
            transition: all 0.3s ease;
        }

        .counter-box:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4);
        }

        .counter-number {
            font-size: 3rem;
            font-weight: 800;
            color: var(--ssl);
            margin-bottom: 10px;
        }

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

        .accordion-item {
            background: rgba(16, 185, 129, 0.1);
            border: 2px solid var(--ssl);
            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(16, 185, 129, 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: 3000px;
            padding: 20px;
        }

        /* Quiz */
        .quiz-container {
            background: rgba(16, 185, 129, 0.1);
            border-radius: 20px;
            padding: 40px;
            margin: 30px 0;
            border: 2px solid var(--ssl);
        }

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

        .quiz-question h4 {
            color: var(--ssl);
            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(--ssl);
            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(--ssl), var(--success));
            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;
        }

        .warning-box {
            background: rgba(251, 191, 36, 0.1);
            border: 2px solid var(--warning);
            border-radius: 15px;
            padding: 25px;
            margin: 25px 0;
        }

        .warning-box h4 {
            color: var(--warning);
            font-size: 1.3rem;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        /* Summary */
        .summary-card {
            background: linear-gradient(135deg, var(--ssl), var(--success));
            border-radius: 25px;
            padding: 50px;
            margin: 40px 0;
            box-shadow: 0 15px 50px rgba(16, 185, 129, 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(--ssl), var(--success));
            border-radius: 25px;
            font-size: 0.9rem;
            font-weight: 600;
            margin: 5px;
        }

        /* Tooltip */
        .tooltip {
            position: relative;
            display: inline-block;
            border-bottom: 2px dotted var(--ssl);
            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(--ssl);
            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(--ssl), var(--success));
            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);
        }

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

            .section {
                padding: 25px;
            }

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

            .port-visual {
                flex-direction: column;
            }

            .arrow {
                transform: rotate(90deg);
            }
        }
    </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 6: SSL/HTTPS Configuration</div>
            <h1>Configuring Apache SSL Ports</h1>
            <p class="hero-subtitle">Change HTTPS port from 443 to 4443 to enable secure connections on both servers!</p>
            
            <div class="port-visual">
                <div class="port-box old">
                    <div class="ssl-icon">๐Ÿ”’</div>
                    <h3>Old HTTPS Port</h3>
                    <div class="port-number">443</div>
                    <p>Default SSL Port</p>
                </div>
                <div class="arrow">โ†’</div>
                <div class="port-box new">
                    <div class="ssl-icon">๐Ÿ”</div>
                    <h3>New HTTPS Port</h3>
                    <div class="port-number">4443</div>
                    <p>Modified XAMPP SSL Port</p>
                </div>
            </div>
        </section>

        <!-- What Is It Section -->
        <section class="section">
            <h2>๐Ÿค” What Are We Doing?</h2>
            <p>
                After configuring the regular HTTP port (80 โ†’ 8080), we now need to configure the <span class="tooltip"><strong>HTTPS/SSL port</strong><span class="tooltiptext">HTTPS is the secure version of HTTP, using SSL/TLS encryption to protect data</span></span> to prevent conflicts between XAMPP and Laragon's secure connections.
            </p>
            <div class="info-card">
                <h4 style="color: var(--info); margin-bottom: 10px;">๐ŸŽฏ The Task</h4>
                <p>We need to edit the <strong>httpd-ssl.conf</strong> file (not httpd.conf from earlier) and change THREE instances of port 443 to 4443:</p>
                <ol style="line-height: 2; margin-top: 15px;">
                    <li><strong>Listen 443</strong> โ†’ Listen 4443</li>
                    <li><strong>&lt;VirtualHost _default_:443&gt;</strong> โ†’ &lt;VirtualHost _default_:4443&gt;</li>
                    <li><strong>ServerName localhost:443</strong> โ†’ ServerName localhost:4443</li>
                </ol>
            </div>
            <p style="margin-top: 20px;">
                Think of HTTPS like a secure, encrypted phone line. Right now, both XAMPP and Laragon want to use the same secure line (443). By giving XAMPP a different secure line (4443), both can handle encrypted traffic without conflicts! ๐Ÿ”
            </p>

            <div class="warning-box">
                <h4>โš ๏ธ Important: Different Config File!</h4>
                <p>This step uses <strong>httpd-ssl.conf</strong> (for HTTPS), NOT httpd.conf (for HTTP). Make sure you select the correct file from the Config dropdown!</p>
            </div>
        </section>

        <!-- Why Use It Section -->
        <section class="section">
            <h2>๐ŸŒŸ Why Configure SSL Ports?</h2>
            
            <div class="change-counter">
                <div class="counter-box">
                    <div class="counter-number">๐Ÿ”’</div>
                    <h4>Secure Connections</h4>
                    <p>Enable HTTPS for both servers simultaneously</p>
                </div>
                <div class="counter-box">
                    <div class="counter-number">๐Ÿ›ก๏ธ</div>
                    <h4>No Conflicts</h4>
                    <p>Prevent "port 443 already in use" errors</p>
                </div>
                <div class="counter-box">
                    <div class="counter-number">๐ŸŒ</div>
                    <h4>Modern Web Dev</h4>
                    <p>Test SSL certificates and secure features locally</p>
                </div>
                <div class="counter-box">
                    <div class="counter-number">โœ…</div>
                    <h4>Complete Setup</h4>
                    <p>Both HTTP and HTTPS fully configured!</p>
                </div>
            </div>

            <div class="info-card" style="margin-top: 30px;">
                <h4 style="color: var(--info); margin-bottom: 15px;">๐Ÿ” What is SSL/HTTPS?</h4>
                <ul style="line-height: 2;">
                    <li><strong>HTTP:</strong> Regular web traffic (port 80/8080) - not encrypted</li>
                    <li><strong>HTTPS:</strong> Secure web traffic (port 443/4443) - encrypted with SSL/TLS</li>
                    <li><strong>SSL Certificate:</strong> Digital certificate that enables encryption</li>
                    <li><strong>Use Cases:</strong> Login pages, payment forms, sensitive data transfer</li>
                </ul>
            </div>
        </section>

        <!-- Visual Guide Section -->
        <section class="section">
            <h2>๐Ÿ“ธ Visual Reference Guide</h2>
            <p>Here's the complete guide showing all three changes needed:</p>
            
            <div class="screenshot-container">
                <img src="https://d41chssnpqdne.cloudfront.net/user_upload_by_module/chat_bot/files/26769899/c11hjYrJdY3oefXM.png?Expires=1771022137&Signature=R4x97EHGkYBSsUFmq2KeXF5v4c9DCNzoMYsgaaNgny~WWIGU1GvHvVHfzHucY7ekk~ESCwROD3xiZIAD3~ZoFr21-tLtilAJERixMN-UHYla5j1RsROEAV6o9L6R8xbij4FIn3dzTYM2dqCkCJ~TwqriqjBcggg4YYRE1lept8EkVqJA7oEADkuOROtxRpAF9H1Hcfma3KLlpu9zI5FQRgwoDATCZXRLPAzpwnTXPvKoa7mo283MuUr1u1WHR6LIximOKWe1-Ai98kx0UJqEECNbQQFiqIhEpI5YGCHYj74LcvtOt4gSICzc5W-wo2hGDjl14gCUtUULk-k02doE~g__&Key-Pair-Id=K3USGZIKWMDCSX" alt="SSL Port Configuration Changes" class="screenshot-img" onclick="this.style.transform = this.style.transform === 'scale(1.5)' ? 'scale(1)' : 'scale(1.5)'">
                <p class="screenshot-caption">๐Ÿ–ผ๏ธ Complete SSL configuration guide (Click to zoom)</p>
            </div>

            <div class="info-card" style="margin-top: 25px;">
                <h4 style="color: var(--info); margin-bottom: 15px;">๐Ÿ” What the Image Shows:</h4>
                <ul style="line-height: 2;">
                    <li>๐Ÿ“ <strong>Change 1:</strong> Listen 443 โ†’ Listen 4443</li>
                    <li>๐Ÿท๏ธ <strong>Change 2:</strong> &lt;VirtualHost _default_:443&gt; โ†’ &lt;VirtualHost _default_:4443&gt;</li>
                    <li>๐ŸŒ <strong>Change 3:</strong> ServerName localhost:443 โ†’ ServerName localhost:4443</li>
                    <li>๐Ÿ’พ <strong>Final Step:</strong> Save and close the file</li>
                </ul>
            </div>
        </section>

        <!-- How It Works Section -->
        <section class="section">
            <h2>โš™๏ธ Step-by-Step Instructions</h2>
            
            <div class="accordion">
                <div class="accordion-item">
                    <div class="accordion-header" onclick="toggleAccordion(this)">
                        <span>Step 1: Access httpd-ssl.conf File</span>
                        <span class="accordion-icon">โ–ผ</span>
                    </div>
                    <div class="accordion-content">
                        <h4 style="color: var(--ssl); margin-bottom: 15px;">๐Ÿ“‚ Opening the SSL Configuration</h4>
                        <ol style="line-height: 2;">
                            <li>Open XAMPP Control Panel</li>
                            <li>Find the <strong>Apache</strong> module row</li>
                            <li>Click the <strong>Config</strong> button next to Apache</li>
                            <li>From the dropdown, select <strong>Apache (httpd-ssl.conf)</strong></li>
                            <li>The file will open in your default text editor</li>
                        </ol>

                        <div class="warning-box" style="margin-top: 20px;">
                            <h4>โš ๏ธ Critical: Select the Right File!</h4>
                            <p>Make sure you select <strong>httpd-ssl.conf</strong>, NOT httpd.conf or httpd-xampp.conf. The SSL configuration is in a separate file!</p>
                        </div>

                        <div class="tip-card" style="margin-top: 15px;">
                            <p>๐Ÿ’ก <strong>File Location:</strong> The file is typically located at <code style="background: rgba(0,0,0,0.3); padding: 3px 8px; border-radius: 5px;">C:\xampp\apache\conf\extra\httpd-ssl.conf</code></p>
                        </div>
                    </div>
                </div>

                <div class="accordion-item">
                    <div class="accordion-header" onclick="toggleAccordion(this)">
                        <span>Step 2: Change Listen Directive (443 โ†’ 4443)</span>
                        <span class="accordion-icon">โ–ผ</span>
                    </div>
                    <div class="accordion-content">
                        <h4 style="color: var(--ssl); margin-bottom: 15px;">๐Ÿ” Finding and Changing Listen Port</h4>
                        <p><strong>Step 1:</strong> Press <kbd style="background: rgba(255,255,255,0.1); padding: 3px 8px; border-radius: 5px;">Ctrl + F</kbd> to open search</p>
                        <p><strong>Step 2:</strong> Type "Listen 443" and press Enter</p>
                        <p><strong>Step 3:</strong> Change it to "Listen 4443"</p>

                        <div class="code-editor" style="margin-top: 20px;">
                            <div class="editor-header">
                                <div class="editor-dot dot-red"></div>
                                <div class="editor-dot dot-yellow"></div>
                                <div class="editor-dot dot-green"></div>
                                <span class="editor-title">httpd-ssl.conf</span>
                            </div>
                            <button class="copy-btn" onclick="copyCode(this, 'Listen 4443')">๐Ÿ“‹ Copy</button>
                            <div class="code-line">
                                <span class="line-number">37</span>
                                <span class="code-content"><span class="comment"># Listen: Allows you to bind Apache to specific ports</span></span>
                            </div>
                            <div class="code-line">
                                <span class="line-number">38</span>
                                <span class="code-content"><span class="comment"># for SSL connections</span></span>
                            </div>
                            <div class="code-line">
                                <span class="line-number">39</span>
                                <span class="code-content"><span class="keyword">Listen</span> <span class="highlight-old number">443</span></span>
                            </div>
                            <div class="code-line">
                                <span class="line-number">40</span>
                                <span class="code-content"><span class="keyword">Listen</span> <span class="highlight-new number">4443</span> <span class="comment">โ† Change to this!</span></span>
                            </div>
                        </div>

                        <div class="info-card" style="margin-top: 20px;">
                            <p>๐Ÿ“ <strong>What this does:</strong> Tells Apache to listen for HTTPS connections on port 4443 instead of the default 443.</p>
                        </div>
                    </div>
                </div>

                <div class="accordion-item">
                    <div class="accordion-header" onclick="toggleAccordion(this)">
                        <span>Step 3: Change VirtualHost Directive</span>
                        <span class="accordion-icon">โ–ผ</span>
                    </div>
                    <div class="accordion-content">
                        <h4 style="color: var(--ssl); margin-bottom: 15px;">๐Ÿท๏ธ Updating Virtual Host Configuration</h4>
                        <p><strong>Step 1:</strong> Press <kbd style="background: rgba(255,255,255,0.1); padding: 3px 8px; border-radius: 5px;">Ctrl + F</kbd> again</p>
                        <p><strong>Step 2:</strong> Search for "&lt;VirtualHost _default_:443&gt;"</p>
                        <p><strong>Step 3:</strong> Change 443 to 4443</p>

                        <div class="code-editor" style="margin-top: 20px;">
                            <div class="editor-header">
                                <div class="editor-dot dot-red"></div>
                                <div class="editor-dot dot-yellow"></div>
                                <div class="editor-dot dot-green"></div>
                                <span class="editor-title">httpd-ssl.conf</span>
                            </div>
                            <button class="copy-btn" onclick="copyCode(this, '<VirtualHost _default_:4443>')">๐Ÿ“‹ Copy</button>
                            <div class="code-line">
                                <span class="line-number">115</span>
                                <span class="code-content"><span class="comment">## SSL Virtual Host Context</span></span>
                            </div>
                            <div class="code-line">
                                <span class="line-number">116</span>
                                <span class="code-content"><span class="comment">#</span></span>
                            </div>
                            <div class="code-line">
                                <span class="line-number">117</span>
                                <span class="code-content"><span class="tag">&lt;VirtualHost</span> <span class="property">_default_</span>:<span class="highlight-old number">443</span><span class="tag">&gt;</span></span>
                            </div>
                            <div class="code-line">
                                <span class="line-number">118</span>
                                <span class="code-content"><span class="tag">&lt;VirtualHost</span> <span class="property">_default_</span>:<span class="highlight-new number">4443</span><span class="tag">&gt;</span> <span class="comment">โ† Change to this!</span></span>
                            </div>
                        </div>

                        <div class="info-card" style="margin-top: 20px;">
                            <p>๐Ÿ“ <strong>What this does:</strong> Configures the virtual host to respond to requests on port 4443. This defines how Apache handles SSL connections for this specific port.</p>
                        </div>
                    </div>
                </div>

                <div class="accordion-item">
                    <div class="accordion-header" onclick="toggleAccordion(this)">
                        <span>Step 4: Change ServerName Directive</span>
                        <span class="accordion-icon">โ–ผ</span>
                    </div>
                    <div class="accordion-content">
                        <h4 style="color: var(--ssl); margin-bottom: 15px;">๐ŸŒ Updating Server Name</h4>
                        <p><strong>Step 1:</strong> Press <kbd style="background: rgba(255,255,255,0.1); padding: 3px 8px; border-radius: 5px;">Ctrl + F</kbd> once more</p>
                        <p><strong>Step 2:</strong> Search for "ServerName localhost:443"</p>
                        <p><strong>Step 3:</strong> Change 443 to 4443</p>

                        <div class="code-editor" style="margin-top: 20px;">
                            <div class="editor-header">
                                <div class="editor-dot dot-red"></div>
                                <div class="editor-dot dot-yellow"></div>
                                <div class="editor-dot dot-green"></div>
                                <span class="editor-title">httpd-ssl.conf</span>
                            </div>
                            <button class="copy-btn" onclick="copyCode(this, 'ServerName localhost:4443')">๐Ÿ“‹ Copy</button>
                            <div class="code-line">
                                <span class="line-number">119</span>
                                <span class="code-content"><span class="comment"># General setup for the virtual host</span></span>
                            </div>
                            <div class="code-line">
                                <span class="line-number">120</span>
                                <span class="code-content"><span class="property">DocumentRoot</span> <span class="string">"C:/xampp/htdocs"</span></span>
                            </div>
                            <div class="code-line">
                                <span class="line-number">121</span>
                                <span class="code-content"><span class="property">ServerName</span> <span class="highlight-old string">localhost:443</span></span>
                            </div>
                            <div class="code-line">
                                <span class="line-number">122</span>
                                <span class="code-content"><span class="property">ServerName</span> <span class="highlight-new string">localhost:4443</span> <span class="comment">โ† Change to this!</span></span>
                            </div>
                        </div>

                        <div class="info-card" style="margin-top: 20px;">
                            <p>๐Ÿ“ <strong>What this does:</strong> Tells Apache that this server identifies itself as "localhost:4443" for SSL connections. This ensures proper URL generation and prevents warnings.</p>
                        </div>
                    </div>
                </div>

                <div class="accordion-item">
                    <div class="accordion-header" onclick="toggleAccordion(this)">
                        <span>Step 5: Save and Restart Apache</span>
                        <span class="accordion-icon">โ–ผ</span>
                    </div>
                    <div class="accordion-content">
                        <h4 style="color: var(--ssl); margin-bottom: 15px;">๐Ÿ’พ Saving Your Changes</h4>
                        <ol style="line-height: 2;">
                            <li>Press <kbd style="background: rgba(255,255,255,0.1); padding: 3px 8px; border-radius: 5px;">Ctrl + S</kbd> to save the file</li>
                            <li>Or click <strong>File โ†’ Save</strong> in your text editor</li>
                            <li>Close the text editor</li>
                            <li>Verify all three changes were saved (reopen if unsure)</li>
                        </ol>

                        <h4 style="color: var(--ssl); margin: 25px 0 15px;">๐Ÿ”„ Restarting Apache</h4>
                        <ol style="line-height: 2;">
                            <li>Go back to XAMPP Control Panel</li>
                            <li>If Apache is running, click <strong>Stop</strong></li>
                            <li>Wait 2-3 seconds for it to fully stop</li>
                            <li>Click <strong>Start</strong> to restart Apache</li>
                            <li>Check that it starts without errors! โœ…</li>
                        </ol>

                        <div class="info-card" style="margin-top: 20px;">
                            <p>๐Ÿ“Š <strong>Success Indicator:</strong> In the XAMPP Control Panel, Apache should now show ports <strong>8080, 4443</strong> in the Port(s) column!</p>
                        </div>

                        <h4 style="color: var(--ssl); margin: 25px 0 15px;">๐Ÿงช Testing HTTPS Connection</h4>
                        <p>After restarting, test your HTTPS setup:</p>
                        <ol style="line-height: 2; margin-top: 15px;">
                            <li>Open your browser</li>
                            <li>Navigate to: <code style="background: rgba(0,0,0,0.3); padding: 3px 8px; border-radius: 5px;">https://localhost:4443</code></li>
                            <li>You'll see a security warning (this is normal for self-signed certificates)</li>
                            <li>Click "Advanced" โ†’ "Proceed to localhost" (or similar)</li>
                            <li>You should see your XAMPP welcome page! ๐ŸŽ‰</li>
                        </ol>
                    </div>
                </div>
            </div>
        </section>

        <!-- Code Breakdown Section -->
        <section class="section">
            <h2>๐Ÿ“ Understanding the Three Changes</h2>
            
            <div class="info-card">
                <h4 style="color: var(--info); margin-bottom: 15px;">๐Ÿ”Œ Change 1: Listen Directive</h4>
                <p><strong>What it does:</strong> Tells Apache which port to listen on for incoming HTTPS requests.</p>
                <div style="background: rgba(0,0,0,0.3); padding: 15px; border-radius: 10px; margin: 15px 0; font-family: 'Fira Code', monospace;">
Listen 4443
                </div>
                <p><strong>Meaning:</strong> "Apache, please watch port 4443 for incoming secure web traffic."</p>
                <p style="margin-top: 10px;"><strong>Result:</strong> HTTPS connections come through port 4443.</p>
            </div>

            <div class="info-card" style="margin-top: 25px;">
                <h4 style="color: var(--info); margin-bottom: 15px;">๐Ÿท๏ธ Change 2: VirtualHost Directive</h4>
                <p><strong>What it does:</strong> Defines the virtual host configuration for SSL connections.</p>
                <div style="background: rgba(0,0,0,0.3); padding: 15px; border-radius: 10px; margin: 15px 0; font-family: 'Fira Code', monospace;">
&lt;VirtualHost _default_:4443&gt;
                </div>
                <p><strong>Meaning:</strong> "This virtual host handles requests on port 4443."</p>
                <p style="margin-top: 10px;"><strong>Result:</strong> Apache knows how to process SSL requests on this port.</p>
            </div>

            <div class="info-card" style="margin-top: 25px;">
                <h4 style="color: var(--info); margin-bottom: 15px;">๐ŸŒ Change 3: ServerName Directive</h4>
                <p><strong>What it does:</strong> Defines the hostname and port for the SSL server.</p>
                <div style="background: rgba(0,0,0,0.3); padding: 15px; border-radius: 10px; margin: 15px 0; font-family: 'Fira Code', monospace;">
ServerName localhost:4443
                </div>
                <p><strong>Meaning:</strong> "When identifying yourself, say you're localhost on port 4443."</p>
                <p style="margin-top: 10px;"><strong>Result:</strong> Proper URL generation and no warnings.</p>
            </div>

            <div class="tip-card" style="margin-top: 25px;">
                <h4 style="color: var(--success); margin-bottom: 10px;">๐ŸŽฏ Why All Three Are Necessary</h4>
                <p><strong>Listen:</strong> Opens the port for listening</p>
                <p><strong>VirtualHost:</strong> Configures how to handle requests on that port</p>
                <p><strong>ServerName:</strong> Identifies the server properly</p>
                <p style="margin-top: 10px;">All three must match for SSL to work correctly! Missing one will cause errors or warnings.</p>
            </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 Wrong Configuration File</h4>
                <p><strong>Problem:</strong> Editing httpd.conf instead of httpd-ssl.conf</p>
                <p><strong>Result:</strong> Changes have no effect on HTTPS</p>
                <p><strong>Fix:</strong> Make sure you select <strong>Apache (httpd-ssl.conf)</strong> from the Config dropdown!</p>
            </div>

            <div class="mistake-card">
                <h4 style="color: var(--danger); margin-bottom: 10px;">โŒ Missing One of the Three Changes</h4>
                <p><strong>Problem:</strong> Changing Listen and VirtualHost but forgetting ServerName</p>
                <p><strong>Result:</strong> Apache shows warnings or SSL doesn't work properly</p>
                <p><strong>Fix:</strong> Always make ALL THREE changes: Listen, VirtualHost, AND ServerName!</p>
            </div>

            <div class="mistake-card">
                <h4 style="color: var(--danger); margin-bottom: 10px;">โŒ Typo in Port Number</h4>
                <p><strong>Problem:</strong> Typing "4434" or "4443" inconsistently</p>
                <p><strong>Result:</strong> Port mismatch causes connection failures</p>
                <p><strong>Fix:</strong> Double-check: it's <strong>4443</strong> (four-four-four-three) in ALL three places!</p>
            </div>

            <div class="mistake-card">
                <h4 style="color: var(--danger); margin-bottom: 10px;">โŒ Not Restarting Apache</h4>
                <p><strong>Problem:</strong> Saving changes but not restarting the server</p>
                <p><strong>Result:</strong> Old configuration still active, port 443 still in use</p>
                <p><strong>Fix:</strong> Always Stop and Start Apache after editing SSL config!</p>
            </div>

            <div class="mistake-card">
                <h4 style="color: var(--danger); margin-bottom: 10px;">โŒ Expecting No Security Warning</h4>
                <p><strong>Problem:</strong> Thinking the browser security warning is an error</p>
                <p><strong>Result:</strong> Confusion about whether setup worked</p>
                <p><strong>Fix:</strong> Security warnings are NORMAL for self-signed certificates. Click "Advanced" โ†’ "Proceed" to continue.</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;">๐Ÿ’Ž Verify All Three Changes</h4>
                <p>After editing, verify all changes were saved:</p>
                <ol style="margin-top: 10px; line-height: 2;">
                    <li>Save and close the file</li>
                    <li>Reopen httpd-ssl.conf</li>
                    <li>Press Ctrl+F and search for "443"</li>
                    <li>You should find NO instances of ":443" (all should be ":4443")</li>
                    <li>If you find any ":443", you missed a change!</li>
                </ol>
            </div>

            <div class="tip-card">
                <h4 style="color: var(--success); margin-bottom: 10px;">๐Ÿ’Ž Understanding SSL Certificate Warnings</h4>
                <p>When you access https://localhost:4443, you'll see a security warning. This is because:</p>
                <ul style="margin-top: 10px; line-height: 2;">
                    <li>XAMPP uses a self-signed SSL certificate</li>
                    <li>Self-signed certificates aren't trusted by browsers</li>
                    <li>This is NORMAL for local development</li>
                    <li>In production, you'd use a real certificate (Let's Encrypt, etc.)</li>
                </ul>
                <p style="margin-top: 10px;">It's safe to click "Advanced" โ†’ "Proceed" for localhost testing!</p>
            </div>

            <div class="tip-card">
                <h4 style="color: var(--success); margin-bottom: 10px;">๐Ÿ’Ž Complete Port Reference</h4>
                <p>After all configurations, here's your complete setup:</p>
                <div style="background: rgba(0,0,0,0.3); padding: 15px; border-radius: 10px; margin-top: 10px;">
                    <strong>๐ŸŸ  XAMPP URLs:</strong><br>
                    โ€ข HTTP: http://localhost:8080<br>
                    โ€ข HTTPS: https://localhost:4443<br>
                    โ€ข phpMyAdmin: http://localhost:8080/phpmyadmin<br>
                    โ€ข MySQL: localhost:3307<br>
                    <br>
                    <strong>๐Ÿ”ต Laragon URLs:</strong><br>
                    โ€ข HTTP: http://localhost<br>
                    โ€ข HTTPS: https://localhost<br>
                    โ€ข MySQL: localhost:3306
                </div>
            </div>

            <div class="tip-card">
                <h4 style="color: var(--success); margin-bottom: 10px;">๐Ÿ’Ž Test Both HTTP and HTTPS</h4>
                <p>Verify both protocols work:</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;">
# Test HTTP (should work)<br>
http://localhost:8080<br>
<br>
# Test HTTPS (should work with warning)<br>
https://localhost:4443<br>
<br>
# Both should show XAMPP welcome page!
                </div>
            </div>

            <div class="tip-card">
                <h4 style="color: var(--success); margin-bottom: 10px;">๐Ÿ’Ž Force HTTPS in Your Projects</h4>
                <p>To redirect HTTP to HTTPS in your projects, add this to .htaccess:</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;">
RewriteEngine On<br>
RewriteCond %{HTTPS} off<br>
RewriteRule ^(.*)$ https://%{HTTP_HOST}:4443/$1 [R=301,L]
                </div>
            </div>

            <div class="tip-card">
                <h4 style="color: var(--success); margin-bottom: 10px;">๐Ÿ’Ž Backup Your SSL Configuration</h4>
                <p>Before making changes, backup the SSL config:</p>
                <ol style="margin-top: 10px; line-height: 2;">
                    <li>Navigate to: <code style="background: rgba(0,0,0,0.3); padding: 3px 8px; border-radius: 5px;">C:\xampp\apache\conf\extra\</code></li>
                    <li>Copy <code style="background: rgba(0,0,0,0.3); padding: 3px 8px; border-radius: 5px;">httpd-ssl.conf</code></li>
                    <li>Paste and rename to <code style="background: rgba(0,0,0,0.3); padding: 3px 8px; border-radius: 5px;">httpd-ssl.conf.backup</code></li>
                    <li>Now edit the original safely!</li>
                </ol>
            </div>
        </section>

        <!-- Quiz Section -->
        <section class="section">
            <h2>๐ŸŽฏ Knowledge Check</h2>
            <p>Test your understanding of SSL port configuration!</p>
            
            <div class="quiz-container">
                <div class="quiz-question">
                    <h4>Question 1: Which configuration file do we edit for HTTPS?</h4>
                    <div class="quiz-option" onclick="checkAnswer(this, false, 0)">A) httpd.conf</div>
                    <div class="quiz-option" onclick="checkAnswer(this, true, 0)">B) httpd-ssl.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) ssl.conf</div>
                    <div class="quiz-feedback" id="feedback0"></div>
                </div>

                <div class="quiz-question">
                    <h4>Question 2: How many instances of "443" need to be changed to "4443"?</h4>
                    <div class="quiz-option" onclick="checkAnswer(this, false, 1)">A) One instance</div>
                    <div class="quiz-option" onclick="checkAnswer(this, false, 1)">B) Two instances</div>
                    <div class="quiz-option" onclick="checkAnswer(this, true, 1)">C) Three instances</div>
                    <div class="quiz-option" onclick="checkAnswer(this, false, 1)">D) All instances in the file</div>
                    <div class="quiz-feedback" id="feedback1"></div>
                </div>

                <div class="quiz-question">
                    <h4>Question 3: What are the THREE directives that need updating?</h4>
                    <div class="quiz-option" onclick="checkAnswer(this, false, 2)">A) Listen, Port, ServerName</div>
                    <div class="quiz-option" onclick="checkAnswer(this, true, 2)">B) Listen, VirtualHost, ServerName</div>
                    <div class="quiz-option" onclick="checkAnswer(this, false, 2)">C) Port, VirtualHost, DocumentRoot</div>
                    <div class="quiz-option" onclick="checkAnswer(this, false, 2)">D) Listen, ServerName, SSLEngine</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 6</h2>
            <div class="summary-grid">
                <div class="summary-item">
                    <div style="font-size: 3rem;">1๏ธโƒฃ</div>
                    <h4>Listen Directive</h4>
                    <p>Listen 443 โ†’ Listen 4443</p>
                </div>
                <div class="summary-item">
                    <div style="font-size: 3rem;">2๏ธโƒฃ</div>
                    <h4>VirtualHost</h4>
                    <p>&lt;VirtualHost _default_:443&gt; โ†’ :4443</p>
                </div>
                <div class="summary-item">
                    <div style="font-size: 3rem;">3๏ธโƒฃ</div>
                    <h4>ServerName</h4>
                    <p>ServerName localhost:443 โ†’ :4443</p>
                </div>
                <div class="summary-item">
                    <div style="font-size: 3rem;">4๏ธโƒฃ</div>
                    <h4>Save & Restart</h4>
                    <p>Ctrl+S then restart Apache</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>โœ… Edit httpd-ssl.conf (NOT httpd.conf)</li>
                    <li>โœ… Change ALL THREE instances: Listen, VirtualHost, ServerName</li>
                    <li>โœ… All three must use port 4443</li>
                    <li>โœ… Save and restart Apache after changes</li>
                    <li>โœ… Security warnings are normal for self-signed certificates</li>
                    <li>โœ… Access XAMPP HTTPS at https://localhost:4443</li>
                </ul>
            </div>

            <div style="margin-top: 30px; text-align: center;">
                <p style="color: white; font-size: 1.3rem; margin-bottom: 15px;">๐ŸŽ‰
Live Preview