title: Python not interpreted on apache
body: <p>I'm trying to set up Python to run on my local apache server on a mac.</p>
  
  <p>On <code>httpd.conf</code>, I've </p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      DocumentRoot "/Users/ptamzz/Sites/python/sandbox.ptamzz.com"
      &lt;Directory "/Users/pritams/Sites/python/sandbox.ptamzz.com"&gt;
          Options Indexes FollowSymLinks MultiViews ExecCGI
          AddHandler cgi-script .py
          Require all granted
      &lt;/Directory&gt;
      DirectoryIndex index.py
      ServerName sandbox.ptamzz.com
      ErrorLog "/var/log/apache2/error-log"
      CustomLog "/var/log/apache2/access-log" common
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>On my document root, I've my <code>index.py</code> file as</p>
  
  <pre><code>#!/usr/bin/python
  print "Content-type: text/html"
  print "&lt;html&gt;&lt;body&gt;Pritam's Page&lt;/body&gt;&lt;/html&gt;"
  </code></pre>
  
  <p>But when I load the page on my browser, the python codes are returned as it is.
  <img src="https://i.stack.imgur.com/QxQ6s.png" alt="Screenshot"></p>
  
  <p>What all am I missing?</p>