On Tuesday, March 20, 2012 10:01:36 AM UTC, Tom Evans wrote:
>
> On Mon, Mar 19, 2012 at 5:24 PM, Jani Tiainen <xxxxxxxxxxxxxx> wrote:
> > Hi,
> >
> > Since we use same setup except one part: we use mod_wsgi instead of
> > mod_fcgi.
> >
> > (Since wsgi is considered to be defacto protocol). Could you try to use
> it?
> >
>
> WSGI is the de-facto for hosting python in web servers. If you aren't
> running just python, it's nice to use the same hosting mechanism for
> all your apps, and fastcgi is a supported mechanism.
>
> OP: You mention using mod_fcgid, but you do not give us any idea of
> how you are using mod_fcgid. Configuration and error logs please. FYI,
> we run django quite happily under mod_fastcgi.
>
> Cheers
>
> Tom
>
Hi Tom, Jani,
Currently struggling to compile mod_wsgi, or more specifically a shared
library version of python - something to do with mismatched 32/64 bit
libraries I think.
Here's an extract from httpd.conf.
RewriteEngine On
RewriteRule ^.*/cfServer/(.*)$ /cgi-bin/django.cgi/$1 [PT]
<Directory "/usr/local/apache2/cgi-bin">
Options ExecCGI
AddHandler fcgid-script .cgi
# AddHandler cgi-script .cgi
Require all granted
</Directory>
and the relevant django.cgi
#!/usr/local/bin/python
from FcgiWsgiAdapter import list_environment, serve_wsgi
import os, sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'cfServer.settings'
os.environ['ORACLE_HOME'] = '/oracle/11gStdEd'
from django.core.handlers.wsgi import WSGIHandler
# use this to test that fastcgi works and to inspect the environment
# serve_wsgi(list_environment)
# use this to serve django
serve_wsgi(WSGIHandler())
The "FcgiWsgiAdapter" referred to came from
djangosnippets.org<http://djangosnippets.org/snippets/1307/>
.
As to error logs, as I mentioned in the original post I don't see anything
added to any logs when this happens and there is only a warning about the
ssl library when apache is restarted.
Regards, ADN
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/uJNwanmADZIJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.