[Newb] Help getting Python to work wuth Apache2

Im trying to get Python working in Apache. Im new to Python altogether (coming from PHP). I ran through the articles on Linode but something still inst right.

My vhost file looks like:

 <virtualhost 66.228.41.252:80="">ServerAdmin richtestani@mac.com
        ServerName friendflix.me
                ServerAlias www.friendflix.me
        DocumentRoot "/srv/www/friendflix.me/public_html/"
        ErrorLog /srv/www/friendflix.me/logs/error.log
            CustomLog /srv/www/friendflix.me/logs/access.log combined

            <location "="" friendflix"="">SetHandler python-program
                PythonHandler django.core.handlers.modpython
                        PythonOption django.root /friendflix.me
                        PythonPath "['/srv/www/friendflix.me/public_html/', '/srv/www'] + sys.path"
                SetEnv DJANGO_SETTINGS_MODULE friendflix.settings
                PythonDebug On</location></virtualhost> 

I have a file at friendflix.me/index.py

The code is simply spit out like a regular text file - no interpreting done.

Is there something I am missing? I installed modpython and modwsgi but maybe they arent enabled?

ny help here would be awesome.

Thanks

Rich

1 Reply

The Django folks recommend using mod_wsgi with Apache… you can find their deployment instructions here. Also, be sure that the basic installation steps for Django have been performed, and that things work ok if you do "manage.py runserver".

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct