Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » first time deploying django on apache with mod_python on fedora 8 [RSS Feed]

#1 Jan. 28, 2011 11:47:07

n.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

first time deploying django on apache with mod_python on fedora 8


Hi,

I'm trying to get my first Django app up and running on amazon ec2
fedora 8 instance on apache with mod_python. I've got mod_python MySQL-
python python-devel Django mysql-server installed.

I've got the homepage to show up, but its a very simple view that just
returns text. Anything more complex produces a 500 error. I don't have
any other views setup right now, but I need the admin to work, which
also current produces a 500 error.

I've got a basic django setup with one app inside of it that has
models and admin stuff.

This is what my httpd.conf file looks like:

<VirtualHost *:80>

ServerName first.django-app.com

DocumentRoot "/sites/django-app"

<Directory "/sites/django-app/">
Order allow,deny
Allow from all
</Directory>

<Location "/">
SetHandler python-program
SetEnv DJANGO_SETTINGS_MODULE django-app.settings
PythonInterpreter django-app
PythonHandler django.core.handlers.modpython
PythonOption django.root /
PythonPath " + sys.path"
PythonDebug On
</Location>

<Location "/images/">
SetHandler None
</Location>

<Directory "/sites/django-app/images">
Order allow,deny
Allow from all
</Directory>

<LocationMatch "\.(png|gif|jpg|mov|mp3|avi|wav)$">
SetHandler None
</LocationMatch>

</VirtualHost>

Any hints, suggestions, ideas on how to get this to work would be
great.

Thank you.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 28, 2011 12:25:30

a.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

first time deploying django on apache with mod_python on fedora 8


is there any reason you are using mod_python instead of, say, wsgi?
modpython is deprecated and there are "better" alternatives.
id start with that. looking in apache logs to find out why you have
the 500 error might help.
(a hunch tells me it might be a python path error)

ash

On 28 Jan., 07:45, n0h8dy <lev.t...@gmail.com> wrote:
> Hi,
>
> I'm trying to get my first Django app up and running on amazon ec2
> fedora 8 instance on apache with mod_python. I've got mod_python MySQL-
> python python-devel Django mysql-server installed.
>
> I've got the homepage to show up, but its a very simple view that just
> returns text. Anything more complex produces a 500 error. I don't have
> any other views setup right now, but I need the admin to work, which
> also current produces a 500 error.
>
> I've got a basic django setup with one app inside of it that has
> models and admin stuff.
>
> This is what my httpd.conf file looks like:
>
> <VirtualHost *:80>
>
>   ServerName  first.django-app.com
>
>   DocumentRoot "/sites/django-app"
>
> <Directory "/sites/django-app/">
>   Order allow,deny
>   Allow from all
> </Directory>
>
> <Location "/">
>   SetHandler python-program
>   SetEnv DJANGO_SETTINGS_MODULE django-app.settings
>   PythonInterpreter django-app
>   PythonHandler django.core.handlers.modpython
>   PythonOption django.root /
>   PythonPath " + sys.path"
>   PythonDebug On
> </Location>
>
> <Location "/images/">
>   SetHandler None
> </Location>
>
> <Directory "/sites/django-app/images">
>   Order allow,deny
>   Allow from all
> </Directory>
>
> <LocationMatch "\.(png|gif|jpg|mov|mp3|avi|wav)$">
>     SetHandler None
> </LocationMatch>
>
> </VirtualHost>
>
> Any hints, suggestions, ideas on how to get this to work would be
> great.
>
> Thank you.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » first time deploying django on apache with mod_python on fedora 8 [RSS Feed]

Board footer

Moderator control

Enjoy the 11th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support