Hey everyone

I've been using mod_wsgi in production for some time with good
results. Yesterday I've stumbled into an issue where one of our django
installations get the "can't adapt to decimal error" where this blog
post (1) reports that it can be fixed by specifying the correct
process-group parameter to the WSGIScriptAlias directive.

But you guessed from the subject of this post that I'm using
WSGIScriptAliasMatch. Basically our platform is a collection of
various apps that are accessed via https://platform/appname/ the
directive below runs the correct django instance via modwsgi.

WSGIScriptAliasMatch ^/([^/]+) /var/www/instances/$1/django.wsgi

I looked and searched the internets far and wide but couldn't find any
working way to use modrewrite to specify the instance name and use it
as a process group. There is an example from the trac wiki that comes
close, but I can't seem to get it working.

Does anyone know a good solution to this problem or have some advice I
can check out?

Kind regards
Michael

Trac example code:

WSGIDaemonProcess site-1 user=user-1 group=user-1 threads=25
WSGIDaemonProcess site-2 user=user-2 group=user-2 threads=25
WSGIDaemonProcess site-3 user=user-3 group=user-3 threads=25

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/trac/([^/]+)
RewriteRule . - [E=trac.process_group:%1,\
E=trac.env_path:/usr/local/trac/sites/%1]

WSGIScriptAliasMatch ^/trac/([^/]+) /usr/local/trac/apache/trac.wsgi

<Directory /usr/local/trac/apache>
WSGIProcessGroup %{ENV:trac.process_group}
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>

(1) 
http://www.defitek.com/blog/2010/06/29/cant-adapt-type-decimal-error-with-django-apache-postgresql-psycopg2/

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
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/modwsgi?hl=en.

Reply via email to