mod_wsgi is an easy to use Apache module that can host Python web applications which support the Python WSGI interface.

learn more… | top users | synonyms

22
votes
7answers
31k views

How to set up Mod_WSGI for Python on Ubuntu

I am trying to setup MOD_WSGI on my Ubuntu box. I have found steps that said I needed to do the following steps I found at http://ubuntuforums.org/showthread.php?t=833766 sudo apt-get install ...
12
votes
1answer
4k views

How many processes should I specify in a WSGIDaemonProcess while running Django through mod_wsgi?

Let's say I have 2 sites(Superuser and Serverfault) running from their own Apache virtual host on one box. The 2 sites are powered by Django and are running on Apache with mod-wsgi. A typical ...
8
votes
1answer
2k views

High CPU load on Django/Apache/mod_wsgi site

Load testing a django 1.21/Apache/mod_wsgi configuration on an AWS small instance (Ubuntu 10.04) with Apache bench is showing extremely high CPU load (using uptime and vmstat) at low concurrent ...
4
votes
1answer
2k views

Apache, Permission denied on mod_wsgi, fixed with WSGISocketPrefix — But why?

In what seemed to be a random occurrence, a site went down tonight and after taking a look at the Apache error logs it was this issue: (13)Permission denied: mod_wsgi (pid=2751): Unable to connect ...
4
votes
3answers
1k views

Apache won't restart after inserting mod_wsgi [closed]

Python interested me as a web scripting language so I wanted to set it up on my testing server. Cannot get Apache to restart with mod_wsgi. Running xampp v win32-1.8 w/apache v2.4, python v2.7 ...
4
votes
3answers
1k views

Python version for mod_wsgi

how can I change the default version mod_wsgi uses? I am using Debian 5 with Apache 2.
4
votes
1answer
128 views

Restrict WSGI based on IP

So I have trac running on my debian server with the VirtualHost file looking like: ... WSGIScriptAlias / /srv/domain/trac.wsgi WSGIScriptReloading On <Directory /srv/domain/tracprojects> ...
4
votes
0answers
586 views

Incorrect deployment of WSGI app to AWS using Elastic Beanstalk

cross-link to AWS forums I have developed a simple Python web service using WSGI and would like to deploy it to AWS cloud using Elastic Beanstalk. My problem is I cannot make all the options I ...
4
votes
2answers
387 views

Deploying Django App with Nginx, Apache, mod_wsgi

I have a django app which can run locally using the standard development environment. I want to now move this to EC2 for production. The django documentation suggests running with apache and ...
3
votes
1answer
2k views

Error installing mod_wsgi in centos with python2.7

When i do "make" in mod_wsgi folder i get this error I configured using following ./configure --with-apxs=/usr/local/apache/bin/apxs --with-python=/opt/python27/bin/python /usr/bin/ld: ...
3
votes
1answer
3k views

Installing mod_wsgi into apache2 on Mac OS X?

I used Homebrew to build and install mod_wsgi: $ brew install mod_wsgi ==> Downloading http://modwsgi.googlecode.com/files/mod_wsgi-3.2.tar.gz ...
3
votes
1answer
1k views

Installing mod_wsgi with python 2.7 on ubuntu

I tried to install mod_wsgi on my ubuntu server using the package manager, but noticed it depends on python 2.6. I'm using python 2.7, and would rather avoid installing 2.6... Does mod_wsgi really ...
3
votes
2answers
1k views

Debian Lenny, Python 2.7 and mod_wsgi

I am running a Debian Lenny box, which comes with Python 2.5.2. I would like to run Python 2.7 for my WSGI apps only, keeping 2.5 as default for the system, but I cannot get it to work. First, I ...
3
votes
1answer
4k views

Python/Django/WSGI/Apache - “ImportError: No module named site”

I am trying to use a django application on my local ubuntu machine. However the site doesn't work and my /var/log/apache2/errors.log is filled with messages like this: ImportError: No module named ...
3
votes
1answer
3k views

Apache2 mod_wsgi django Named Virtual Servers

I'm trying to set up two seperate django sites using mod_wsgi on apache. The first site is working fine, but the second site cupaday.dyndns.biz is giving a 403: [Tue Feb 07 22:32:57 2012] [error] ...
3
votes
1answer
652 views

Django site performance problem

my mod_wsgi/django app has ~2s response time with or without memcached in-memory caching. response is the same 2s with or without DNS resolution (i.e. with direct IP request) for comparison, a ...
3
votes
1answer
492 views

Deploying a Django application in a virtual Ubuntu Server

I have a virtualbox machine running Ubuntu Server 10.04LTS. My intention is to this machine to work like a VPS, this way I can learn and prepare for when I get a VPS service. Apache+mod_wsgi for ...
3
votes
2answers
861 views

Broken URL rewriting on Django/modwsgi setup

I am trying to setup my Django app to run under Apache with modwsgi. I have defined the following virtualhost: <VirtualHost *> ServerName www.domain.com ServerAlias domain.com ...
2
votes
1answer
285 views

Find site of apache from linux process table

I am using Ubuntu server and when I run ps aux I get the following process table http://pastebin.com/NJsASBek as we can see apache proceess are shown like this: www-data 26487 0.0 0.9 245476 14920 ...
2
votes
3answers
2k views

Where is the environment variable?

I have an apache2 server with active mod-wsgi, but I can't get the environment variable PYTHON_EGG_CACHE. Here the important lines out of my virtualhost.conf: DAV svn SVNParentPath /var/svn ...
2
votes
2answers
624 views

my first “production” debian server configuration

I have been using Debian for a year, mostly as the distro for my internal company server. Now I am making a public e-commerce website and I am planning to use a dedicated Debian server at a datacenter ...
2
votes
3answers
120 views

To know whether my Uni can run Python web applications

I am completing my first database project. I am going to set up mod_wsgi to Apache such that I can run Python webframework on my Uni's servers. I am not sure whether my Uni has those tools or not. My ...
2
votes
2answers
408 views

How can I run two Django versions in the same server?

i've got two web apps. One was developed using Django 1.0 and the other using Django 1.4. How can I run both apps in the same apache2 server using two versions of django? Somebody told me something ...
2
votes
2answers
502 views

wsgi and python print statements

I have become aware that the print statements in my django app are causing wsgi to error and fail. Without going over all my code and removing/commenting out the print statements, is there a way I can ...
2
votes
7answers
285 views

I'm DOSing my own Apache server, and I can't stop immediately. What can I do to make things better in the short term?

We've got a BUNCH of distributed clients that, among other things, upload log files to our Apache server. We messed up log rotation on some logs, so we're now uploading relatively large files from ...
2
votes
2answers
592 views

We have nginx proxying to apache w/mod wsgi and very high server load, how to track down cause?

We have an nginx instance sitting in front of apache 2 (nginx handles static resources, dynamic content requests get proxied to apache) which is primarily using mod_wsgi to server various ...
2
votes
2answers
96 views

What are the problems of setting MaxRequestsPerChild to 1 of mpm_prefork module

For my application I had to have this configuration for it works : <IfModule mpm_prefork_module> MaxRequestsPerChild 1 </IfModule> What are the problem that I can encounter with ...
2
votes
1answer
498 views

Do Apache + mod_wsgi httpd.conf settings for django affect mysql?

I have a django website using Apache and mod_wsgi. Since the last 4-5 days I keep getting this type of error on my admin e-mail. OperationalError: (1040, 'Too many connections') I have installed ...
2
votes
1answer
2k views

mod_wsgi daemon mode - WSGIDaemonProcess per virtual host configuration?

I had a fairly simple question. When mod_wsgi is run in Daemon mode, and you enable the WSGIDaemonProcess and WSGIProcessGroup directives on a per virtual host basis, are these picked up by other ...
2
votes
1answer
151 views

Django + Apache + mod_wsgi: Why is wsgi script executed multiple times?

I'm relatively new to all the server technology and I followed this tutorial to deploy my django app on an Apache Webserver, using mod_wsgi: ...
2
votes
1answer
2k views

Apache2 mod_wsgi python 2.6 Django very slow

I've tried about 1000x things, but I can't seem to figure out why a simple django website is slow using apache 2.2.14/wsgi latest / django 1.3. I've confirmed the problem isn't our database by turning ...
2
votes
1answer
1k views

Fine tuning Django Apache mod_wsgi

First off I am looking for some help setting up my Django and Apache settings to fine tune it for my site for the best performance cost effectiveness. Server info: Django 1.3 Webfacion server, 80mb ...
2
votes
1answer
508 views

WSGIDaemonProcess: specifying a user

I have a user account all set up for this Python webapp I'm deploying with mod_wsgi. It's super-unprivileged, and only gets to read from the appdir and write to a separate set of tempdirs which no one ...
2
votes
4answers
4k views

How to check if mod_wsgl has correcly installed in apache

I have been trying to install mod_wsgl and django but iwas unsuccessful. I am thinking of going step by step. LEaving django aside how can i make sure that i have mod_wsgl installed correctly so ...
2
votes
1answer
2k views

django mod_wsgi memory problem

I have my django application on a VPS server (128mb ram) When i start it with python manage.py runserver, it works perfectly, but if I try to use it over apache/mod_wsgi it causes major slowdown very ...
2
votes
1answer
466 views

Causes of crash doing matrix multiply in Python/mod_wsgi/apache app

I am building a web app using Python 2.7, its bottle micro framework, and apache (via mod_wsgi). This app has some RESTish endpoints, one of which results in a connection error in the browser (Firefox ...
2
votes
1answer
228 views

Apache, mod_wsgi, Django Error When Not SSH'd In To Server

I'm getting some strange errors that I've worked through to this point. I have an Ubuntu server setup with Apache + mod_wsgi + Django. When I'm SSH'd into the server, I can access the website fine ...
2
votes
2answers
247 views

Mod_wsgi daemon process status

Is there a way to get the status of the mod_wsgi daemon processes and threads? Something like apache's server status page. My server's taking a while to respond sometimes and I want to see if it's ...
2
votes
1answer
1k views

apache+mod_wsgi configuration for django project(s) on a quad core

I've been experiment quite some time with a "typical" django setting upon nginx+apache2+mod_wsgi+memcached(+postgresql) (reading the doc and some questions on SO and SF, see comments) Since I'm still ...
2
votes
4answers
2k views

Setting environment variables in mod_wsgi for Django

I'm running Django on an RHEL instance under Apache/mod_wsgi, and I'm having issues setting some environment variables for the Python process. All of the components (Apache, Python, mod_wsgi, ...
2
votes
1answer
1k views

Make mod_wsgi use python2.7.2 instead of python2.6?

i am running Ubuntu 10.04.1 LTS and it came pre-packed with python2.6 but i need to replace it with python2.7.2. (The reason is simple, 2.7 has a lot of features backported from 3 ) i had ...
2
votes
2answers
981 views

Deploying Django with mod_wsgi

/etc/apache2/site-available/mysite.com <VirtualHost my_ip_here:80> ServerAdmin foo@mysite.com ServerName mysite.com ServerAlias www.mysite.com WSGIScriptAlias / ...
2
votes
1answer
2k views

How to configure ReviewBoard with mod_wsgi and Apache in non-root location

I'm trying to configure ReviewBoard on a Mac running OS X Leopard (10.5.8) with Python 2.5 and mod_wsgi 3.3 installed. I'm using sqlite and the standard Apache 2 that comes with OS X; the document ...
2
votes
1answer
480 views

Django Deploy Reccomendations

I have a Web application provided in SaaS way... (each client has his own sub-domain and his own database). My app uses Django Python and Postgresql. Right now is hosted on a linux shared hosting ...
2
votes
1answer
1k views

File upload issue with Django app running under Apache/mod_wsgi when daemonized

I've got a Django app running under Apache2 (linux) using mod_wsgi and file uploads fail when running in daemon mode but works when the python interpreter is embedded. Any idea what could be causing ...
2
votes
2answers
4k views

mod_wsgi, .htaccess and rewriterule

I'm using several django projects running on the same apache instance through mod_wsgi, configured with virtualhost for each site, see the httpd.conf here. For one of the sites I want to use ...
2
votes
4answers
2k views

Apache MaxClients setting when KeepAlive is Off

with apache, is it reasonable to reduce MaxClients when KeepAlive is Off? currently, MaxClients is set to 150, which is the default for mpm-worker. nginx serves static files and reverse-proxies to ...
2
votes
1answer
111 views

Configuring wsgi for a simple Python based site

I have an Ubuntu 10.04 server that already has apache and wsgi working. I also have a python script that works just fine using the make_server command: if __name__ == '__main__': from ...
2
votes
1answer
255 views

Apache2: mod_wsgi and passenger do not get along

I'm trying to run an instance of apache2 on an ubuntu server with two virtual hosts. One for redmine(phusion passenger), and one for ReviewBoard(mod_wsgi). I haven't created a single server ...
2
votes
1answer
371 views

django, mod_wsgi, MySQL High CPU - Problems

I am having a problem with an OSQA site. It is Django/Apache/mod_wsgi configured site. Every hour, the CPU spikes to 164% (Average) for task HTTPD. After 10 minutes, it frees back up. I have reviewed ...