title: Apache 2.4.1 configuration
body: <p>I am facing a unique issue. I have setup Apache 2.4.1 and below are my configuration:</p>
  
  <pre><code>ServerRoot "prakash_prasad/bin"
  AddHandler cgi-script .py
  ScriptAlias /~prakash_prasad/ "/x/home/prakash_prasad/public_html/"
  ScriptAlias /test/ "/x/test/prakash_prasad/public_html/"
  DocumentRoot "/mybox/prakash_prasad/bin/htdocs"
  &lt;Directory "/x/test/*/public_html/"&gt;
      Options +ExecCGI
      Options ExecCGI
      Order allow,deny
      Allow from all
      Options All
      SetHandler cgi-script
      AddHandler cgi-script .py
      AllowOverride None
      Require all granted
      AddHandler cgi-script .py
      SetHandler cgi-script
      AllowOverride None
      Require all granted
      Options ExecCGI
      Order allow,deny
      Allow from all
      Options All
      SetHandler cgi-script
      AddHandler cgi-script .py
      AllowOverride None
      Require all granted
  &lt;/Directory&gt;
  
  &lt;Directory "/x/home/prakash_prasad/public_html/*"&gt;
      Options +ExecCGI
      Options ExecCGI
      Order allow,deny
      Allow from all
      Options All
      SetHandler cgi-script
      AddHandler cgi-script .py
      AllowOverride None
      Require all granted
      AddHandler cgi-script .py
      SetHandler cgi-script
      AllowOverride None
      Require all granted
  &lt;/Directory&gt;
  </code></pre>
  
  <p>Now I have a sample 'first.py' program dumping "Hello World!" which works fine when I enter the below url in the browser</p>
  
  <blockquote>
    <p>http://:ip/test/first.py</p>
  </blockquote>
  
  <p>But when I try to load an HTML page:</p>
  
  <blockquote>
    <p>http://:ip/test/index.html</p>
  </blockquote>
  
  <p>I get below error in browser:</p>
  
  <p>Internal Server Error</p>
  
  <p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p>
  
  <p>Please contact the server administrator at you@example.com to inform them of the time this error occurred, and the actions you performed just before this error.</p>
  
  <p>More information about this error may be available in the server error log.</p>
  
  <p>while in LOGS I see:</p>
  
  <pre><code>[Thu May 17 23:07:10.664648 2012] [cgid:error] [pid 10386:tid 47977877412864] (13)Permission denied: AH01241: exec of '/x/test/prakash_prasad/public_html/index.html' failed
  [Thu May 17 23:07:10.665034 2012] [cgid:error] [pid 9849:tid 1232931136] [client 10.239.40.209:54712] End of script output before headers: index.html
  </code></pre>
  
  <p>Please let me know what config I need to correct?</p>
  
  <p>::UPDATES::</p>
  
  <p>I narrowed to a point but not sure the issue could be that:</p>
  
  <p>When I comment the cgid module solved the issue for me:</p>
  
  <pre><code># LoadModule cgid_module modules/mod_cgid.so
  </code></pre>
  
  <p>My HTML page comes fine but not my Python script</p>
  
  <p>While I uncomment it </p>
  
  <pre><code>LoadModule cgid_module modules/mod_cgid.so
  </code></pre>
  
  <p>My script works fine but HTML files give error.</p>
  
  <p>Any idea what could the issue be?</p>