Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Jun 10, 2011 12:03 pm 
Offline
Newbie

Joined: Fri Jun 10, 2011 11:44 am
Posts: 2
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:

Code:
<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 mod_python and mod_wsgi but maybe they arent enabled?

ny help here would be awesome.
Thanks
Rich


Top
   
 Post subject:
PostPosted: Fri Jun 10, 2011 6:59 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
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".

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group