Apache2 + Python WITHOUT mod_pytho

pistacchio pistacchio at gmail.com
Wed Jun 25 11:13:42 CEST 2008

Hi to all!
How can i configure apache2 so that it processes all .py files with
python _without_ using mod_python?
I'm on Ubuntu 8.4.

currently my /etc/apache2/sites-available/default file reads:

NameVirtualHost *
<VirtualHost *>
        ServerAdmin webmaster at localhost

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


        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
        ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from ::1/128


Thanks in advance

More information about the Python-list mailing list