Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ubuntu machine.

Installed mod_python using apt-get.

added

   <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all  
            AddHandler mod_python .py
            PythonHandler mod_python.publisher
            PythonDebug On
    </Directory>

to the sites-available/default file.

Restarted Apache.

But I still do not see Python running. Instead the browser starts downloading the file.

share|improve this question
    
Think about using code.google.com/p/modwsgi instead. – bernie Aug 10 '10 at 5:48
    
I still have no clue what is wrong with what I am doing. I was wondering if modwsgi has some advangates over mod_python when it comes to installing using Django. – sabertooth Aug 11 '10 at 1:16
up vote 1 down vote accepted

Got it!

PythonHandler mod_python.publisher 

needs to be

PythonHandler mod_python.cgihandler

Then you can run Python as CGI.

share|improve this answer
    
In my case publisher did work. What i miss is the from mod_python import apache on the .py file, otherwise fails. Now i can server python as well. Nice :D – erm3nda Sep 19 '15 at 2:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .