{
  "id": "10",
  "content": [
    {
      "type": "heading",
      "text": "Deployment on Apache (cgi-bin & .htaccess)"
    },
    {
      "type": "text",
      "html": "Typical setup: enable CGI, place scripts in <code>cgi-bin</code>, ensure correct permissions, and configure handlers."
    },
    {
      "type": "text",
      "html": "<pre><code># In Apache config or .htaccess (if allowed)\nOptions +ExecCGI\nAddHandler cgi-script .cgi .pl\n</code></pre>"
    },
    {
      "type": "text",
      "html": "Keep scripts lean, validate inputs, and log errors to server logs for troubleshooting."
    }
  ],
  "quiz": {
    "questions": [
      {
        "id": "q1",
        "type": "single",
        "text": "Which Apache option allows executing CGI scripts in a directory?",
        "options": [
          {
            "id": "a",
            "text": "Options +ExecCGI"
          },
          {
            "id": "b",
            "text": "Options +Indexes"
          },
          {
            "id": "c",
            "text": "Options -Exec"
          }
        ],
        "correct": [
          "a"
        ]
      },
      {
        "id": "q2",
        "type": "single",
        "text": "Which directive maps extensions to CGI execution?",
        "options": [
          {
            "id": "a",
            "text": "AddHandler cgi-script .cgi .pl"
          },
          {
            "id": "b",
            "text": "AddType image/png .png"
          },
          {
            "id": "c",
            "text": "DirectoryIndex index.pl"
          }
        ],
        "correct": [
          "a"
        ]
      }
    ]
  }
}