Friday, February 10, 2012

Thread local storage issue under Apache

Hi everyone.

I have a django project in where I've added a custom .py file which
launches a shell command (a GDAL utility to manipulate shapefiles):
subprocess.call(["ogr2ogr", "-t_srs", "EPSG:900913", shpGoogle, shpOrig])

If I run the function containing this command using django web server
everything works fine and my new file have produced and stored on the
filesystem.

But if I run the same application under the Apache web server, I get the
following error:
Fatal Python error: Couldn't create autoTLSkey mapping

Do you have any idea on how to solve this?

Thanks in advance

Configuration details follows...

I'm using Apache/2.2.20 on Ubuntu-11.10 mod_wsgi-3.3 Python-2.7.2
django-1.3.1

My django.wsgi file is the following
import os, sys
sys.path.append('/home/candini/Repos/CanetaRepo/tmp/STO')
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

And this is the mod_wsgi configuration:
NameVirtualHost jsonopenlayers:80
<VirtualHost jsonopenlayers:80>
ServerAdmin candini@meeo.it
ServerName jsonopenlayers
#DocumentRoot /var/www
DocumentRoot /home/candini/Repos/CanetaRepo/tmp/STO/jsonopenlayers
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

#<Directory /var/www/>
<Directory /home/candini/Repos/CanetaRepo/tmp/STO/jsonopenlayers/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

Alias /static/
/home/candini/Repos/CanetaRepo/tmp/STO/jsonopenlayers/static/

<Directory /home/candini/Repos/CanetaRepo/tmp/STO/jsonopenlayers/static>
Order deny,allow
Allow from all
</Directory>

WSGIScriptAlias /
/home/candini/Repos/CanetaRepo/tmp/STO/apache/django.wsgi

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate