mod-wsgi

apache + mod_wsgi + aspell-python on OS X 10.5.8

I have a website that processes user submitted documents in a variety of ways, one of which is to do a spell check on a part of each document. When I set this website up on a Mac Mini (yes, I realize that's a pretty weak piece of equipment for a website, but it's internal and no one outside the office sees it), I remember having some tr...

Is there a better way to serve the results of an expensive, blocking python process over HTTP?

We have a web service which serves small, arbitrary segments of a fixed inventory of larger MP3 files. The MP3 files are generated on-the-fly by a python application. The model is, make a GET request to a URL specifying which segments you want, get an audio/mpeg stream in response. This is an expensive process. We're using Nginx as th...

mod_wsgi on Snow Leopard python version mismatch

Hello, I'm trying to run mod_wsgi 3.1 under Apache 2.2.14 using a non-default python installation on Mac OS X 10.6. After downloading the mod_wsgi source I run: sudo apachectl -k stop then ./configure --with-python=/usr/local/Cellar/python/2.6.4/bin/python make sudo make install I then start up apache again sudo apachectl -k sta...

How does Django + mod_wsgi affect the python path?

I have a simple setup with my python libraries in /domains/somedomain.com/libs/ and all my tests run fine. I start WSGI with DJANGO_SETTINGS_MODULE to "somedomain.settings" where somedomain is a package in libs/ Suddenly, when adding pywapi.py into libs/ I can't import it when hitting the site. But, if I add 'import pywapi' to my wsgi s...

Tracking system and real time stats analysis in Python

This question is related to an older question: http://stackoverflow.com/questions/2019096/mysql-tracking-system. In short: I have to implement a tracking system that will have high loads using Python. For the database part I've settled on mongoDB (which sounds like the right tool for this job). The development language will be Python. ...

Unknown Authn provider: wsgi ... fail!

I have working wsgi authentication on another server, however a second server is not accepting the same configuration and errors upon reload with the message: Syntax error on line 12 of /etc/apache2/sites-enabled/mydomain.com Unknown Authn provider: wsgi ... fail Here is the relevant portion of the config file (line 12 is WSGIAuth...

static file with mod_wsgi in django

Hello, I've searched a lot but I still have a problem with the static files (css, image,...) with my django website. I'm using mod_wsgi with apache on archlinux 64bits I've added it in my http.conf : LoadModule wsgi_module modules/mod_wsgi.so <VirtualHost *:80> WSGIDaemonProcess mart.localhost user=mart group=users processes=2 ...

Couldn't find package libapache2-mod-wsgi

Hello, I have developed a website in Django, and now it must go into production. This i want to do with mod_wsgi and apache2. Unfortunately i get the error 'Couldn't find package libapache2-mod-wsgi' when running the next command: sudo apt-get install libapache2-mod-wsgi I am using apache2 on ubuntu server kermic(9.10). I will enter...

CherryPy changes my response code

In my python application using mod_wsgi and cherrypy ontop of Apache my response code get changed to a 500 from a 403. I am explicitly setting this to 403. i.e. cherrypy.response.status = 403 I do not understand where and why the response code that the client receives is 500. Does anyone have any experience with this problem> ...

Error installing mod_wsgi 3.1

I am trying to install mod_wsgi 3.1 on Ubuntu 9.10 and am getting this error when I attempt to make root@me:/src/mod_wsgi-3.1$ ./configure --with-python=/usr/bin/python2.6 checking for apxs2... /usr/bin/apxs2 checking Apache version... 2.2.12 configure: creating ./config.status config.status: creating Makefile root@me:/src/mod_wsgi-3.1...

Problems with Django + mod-wsgi + psycopg2

So I am trying to make Django running with mod-wsgi for the first time. I have configured Apache as shown in examples and I am pretty sure I did everything right. I did not set the PYTHON_EGG_CACHE variable so it uses the default: /var/www/.python-eggs. I have created this directory and made it writeable for user www-data. When I open ...

Install python for 64-bit Ubuntu - trying to install mod_wsgi

I have previously had python installed because of postfix. I then installed Django. Next, I tried to install mod_wsgi for deploying a Django application. I get this error: make: * [mod_wsgi.la] error 1 Apparently it is due to an older version of python. I tried to install a newer version of python but I still get the same problem. This...

How can I access the WSGIScriptAlias from my django settings file?

I have this line in my wsgi.conf file: WSGIScriptAlias /trunk "c:/app/trunk/app.wsgi" Inside of my django settings file, I need to know the alias "/trunk" to get LOGIN_URL to work properly. How can I retrieve this value from my apache settings? Thanks! Pete ...

Works using Django development server, but throws import error with Apache using mod_wsgi

I have a Django project that works fine with the development server that comes with it. No errors are produced at all when I use "django manage.py runserver" and the app works fine, but when I try to use it with mod_wsgi and Apache the browser displays "Internal Server Error" with a 500 error code and it generates an import error in t...

Opening POSTed file with PIL Image

Using WSGI, webob and PIL, I'm trying to use Image.open() on a file directly from the request. However, Image.open() always throws the exception "cannot identify image file". The image is the only field, no other POST or GET variables are used. The file is coming from a standard HTML upload form with enctype="multipart/form-data". im...

How do I properly setup my python paths and permissions for Django+mod_wsgi deployment?

The issue I'm having is my wsgi file can't import the wsgi handlers properly. /var/log/apache2/error.log reports: ImportError: No module named django.core.handlers.wsgi Googling this brings up a couple results, mostly dealing with permissions errors because www-data can't read certain files and/or the pythonpath is not correct. ...

WSGI/Django: pass username back to Apache for access log

My Django app, deployed in mod_wsgi under Apache using Django's standard WSGIHandler, authenticates users via form login on the Django side. So to Apache, the user is anonymous. This makes the Apache access log less useful. Is there a way to pass the username back through the WSGI wrapper to Apache after handling the request, so that it...

How can you force a memory limit in Django WSGI apps?

I want my app to throw an MemoryError when its usage goes over 1GB. I'm running in WSGI daemon mode. I see 3 places the memory limit could be: apache.conf wsgi somewhere django configuration but I can't find the right config options. In PHP you can do this with : php_value memory_limit 1GB in your apache.conf ...

Web.py mod_wsgi autoreload

I am running the latest version of web.py with mod_wsgi and have this in my code: application = web.application(urls, globals(), autoreload=True).wsgifunc() It is autoreloading most of the time but every so often I need to go to the command line and restart Apache myself. Any idea why it is not always "autoreloading"? Details: Apach...

Is there an "easy" way to get mod_wsgi to reflect Django updates?

I'm reading http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode but it seems like way too much work, I've been restarting my apache2 server gracefully whenever I make tweaks to Django code as it inconsistently picks up the right files and probably tries to rely on cached .pycs. ...