Questions tagged [mod-wsgi]

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

Filter by
Sorted by
Tagged with
27 votes
2 answers
22k 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 ...
Thierry Lam's user avatar
  • 6,321
26 votes
7 answers
47k 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 ...
AutomatedTester's user avatar
19 votes
6 answers
28k views

WSGI : Truncated or oversized response headers received from daemon process

System Configuration : Apache2, Django 1.10, Python 3, Ubuntu 16.04 LTS Django debug=True. /var/log/apache2/error.log [52:53.057967] [wsgi:error] [pid 4303] [client 1.1.1.22:24409] Timeout when ...
Suraj's user avatar
  • 469
17 votes
2 answers
15k views

Non-responsive apache + mod_wsgi after installing scipy

I am currently running a Centos 6.4 server, with Apache 2.2.15 and mod_wsgi 3.2. The server is hosting a django-based site (django 1.5.1, python 2.6.6). Everything was running fine until I installed ...
MarkD's user avatar
  • 273
14 votes
4 answers
3k 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 ...
JCWong's user avatar
  • 241
10 votes
2 answers
4k 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 ...
litterbug's user avatar
  • 121
8 votes
1 answer
14k views

Reason for "Gateway Timeout" (mod_wsgi)

I get "Gateway Timeout" 504: The gateway did not receive a timely response from the upstream server or application. I use apache with mod_wsgi Version 4.4.8. In the apache error log I see: ...
guettli's user avatar
  • 3,823
8 votes
1 answer
45k 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 ...
Amandasaurus's user avatar
  • 32.3k
8 votes
2 answers
3k 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 ...
Zmicier Zaleznicenka's user avatar
7 votes
3 answers
25k views

How can I install wsgi on CentOS using yum?

How can I install wsgi on CentOS using yum? Is there any repository with mod_wsgi?
sorin's user avatar
  • 8,216
7 votes
3 answers
14k views

Python version for mod_wsgi

how can I change the default version mod_wsgi uses? I am using Debian 5 with Apache 2.
Etam's user avatar
  • 171
7 votes
1 answer
41k views

How to get nginx to pass HTTP_AUTHORIZATION header to Apache

Am using Nginx as a reverse proxy to an Apache server that uses HTTP Auth. For some reason, I can't get the HTTP_AUTHORIZATION header through to Apache, it seems to get filtered out by Nginx. Hence, ...
codeinthehole's user avatar
6 votes
1 answer
12k 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 ...
Bartek's user avatar
  • 809
6 votes
1 answer
4k views

mod_wsgi "Call to 'site.addsitedir()' failed" on AWS Elastic Beanstalk Python 3.6 platform

On AWS Elastic Beanstalk, on the "64bit Amazon Linux 2017.09 v2.6.0 running Python 3.6" platform, there seems to be a problem with the mod_wsgi configuration. I see this in /etc/httpd/conf.d/wsgi.conf:...
David Eyk's user avatar
  • 667
6 votes
1 answer
11k views

Django with Apache and mod_wsgi: no system log unless setting Debug = True

I'm using apache web server and mod_wsgi to transfer request to django. $ apache2ctl -v Server version: Apache/2.4.10 (Raspbian) Server built: Sep 17 2016 16:40:43 I'm using this apache site to ...
Thomas's user avatar
  • 61
6 votes
1 answer
7k views

How to make mod_wsgi use Python 3.9?

I originally had Python 3.6 installed and working well with WSGI and Apache2 on my Linux server. Then I created a Flask app that had a dependency needing Python 3.7. I've successfully (and I think) ...
ThatCoolCoder's user avatar
5 votes
1 answer
21k views

Multiple python versions under apache+mod_wsgi

I have several virtual hosts configured under the same apache instance on redhat: apache-2.2.15 mod_wsgi-3.5 compiled with default system python-2.6 For every virtual host WSGIScriptAlias setting ...
alecxe's user avatar
  • 81
5 votes
2 answers
13k 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 ...
Designer023's user avatar
5 votes
4 answers
13k 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 ...
guron's user avatar
  • 51
5 votes
2 answers
6k 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: /opt/...
Mirage's user avatar
  • 599
5 votes
1 answer
24k views

Directory, Proxy and Location - how to co-exist in one Apache configuration?

Mostly through trial and error I have created the Apache configuration file below. It aims to allow a server on localhost:8002 and a trac server via WSGI to share an LDAP server and appear to be on ...
Jon Hadley's user avatar
5 votes
3 answers
7k 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 32bit,...
chris's user avatar
  • 51
5 votes
2 answers
2k views

504s on Elastic Beanstalk app deploy (user -> ELB -> Elastic Beanstalk mod_wsgi)

I have a Python Elastic Beanstalk load-balanced app. Here is the path a user request takes on its way into the Elastic Beanstalk app: user -> Elastic Beanstalk ELB -> Elastic Beanstalk mod_wsgi ...
markplindsay's user avatar
4 votes
2 answers
3k 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 ...
Liam's user avatar
  • 241
4 votes
2 answers
4k views

How to display the "Hello world" using apache using Python using mod_wsgl but without CGI

I have installed the Python , apache. The command line programs are working with python. I have two virtual hosts in apache site1.local site2.local WHat i want is i place file in site1 root ...
user avatar
4 votes
1 answer
16k 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] [...
dm03514's user avatar
  • 201
4 votes
1 answer
6k views

Apache mod_wsgi installation error

I'm running CentOS 6.7, I'm trying to install mod_wsgi (https://code.google.com/p/modwsgi/) Normally I'd just do: yum install mod_wsgi But since I need to make sure it compiles under Python 2.7 (...
Jorg Ancrath's user avatar
4 votes
1 answer
3k views

How can I make apache give the config file path and line number for a 403 error

I'm running Apache 2.4.7 on debian unstable. I'm getting 403 errors when I try to run supysonic using the mod_wsgi module. I turned the LogLevel for wsgi and authz_core up to trace6, but I'm still ...
Brian Minton's user avatar
4 votes
1 answer
773 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> ...
ingh.am's user avatar
  • 283
4 votes
2 answers
2k 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 ...
user avatar
4 votes
0 answers
3k views

mod_wsgi End of script output before headers

I have a problem with my web application. Sometimes when people upload an image (seems to happen with large image only), I have mod_wsgi who crash with this message : End of script output before ...
trnsnt's user avatar
  • 133
3 votes
1 answer
33k views

apache2.4 virtual host blocking access with authz_core log, even though authz not configured

So I'm getting 403: Forbidden errors on one of my apache2.4 virtualhosts. What's interesting, is that /var/log/apache2/error.log reports: authz_core:error] [pid 4878:tid 140394394269440] [client 10....
1n5aN1aC's user avatar
  • 145
3 votes
1 answer
925 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 ...
xpanta's user avatar
  • 159
3 votes
1 answer
2k 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: http://thecodeship.com/deployment/deploy-django-apache-...
basilikum's user avatar
  • 217
3 votes
2 answers
4k views

Apache - Difference between ScriptAlias and WSGIScriptAlias

I'm using apache on RHEL Linux server In my /etc/httpd/conf.d/httpd.conf there are two directives: WSGIScriptAlias /apps /var/www/apps <Directory /var/www/apps > Options MultiViews ExecCGI ...
Jiri Kadlec's user avatar
3 votes
1 answer
7k 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 ######################################################...
Daryl Spitzer's user avatar
3 votes
1 answer
5k views

How to debug Django/WSGI/Apache errors

I have a Django 1.11.17 application deployed on Apache 2 and WSGI, Python 2.7. Apache shows an error "Truncated or oversized response headers received from daemon process" I have checked the ...
Jose Luis de la Rosa's user avatar
3 votes
1 answer
5k views

Running apache + mod_wsgi as different user

I have a django project, which I am moving from the dev-server to apache. I have managed to get it server with mod_wsgi, but it runs as apache. Mod_wsgi documentation says, that if apache is run as ...
Esa Varemo's user avatar
3 votes
1 answer
5k 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 ...
Filipe Correia's user avatar
3 votes
1 answer
6k 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 ...
Jonathan S. Fisher's user avatar
3 votes
2 answers
10k 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 ...
issa marie tseng's user avatar
3 votes
2 answers
2k 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 ...
igor's user avatar
  • 161
3 votes
2 answers
13k views

How to make apache to run python scripts using MOD_WSGI or MOD_PYTHON in RHEL6?

I am trying to make the apache to run python scripts. I have MOD_WSGI , Apache , Python installed on RHEL6. I even edited httpd.conf file to include these lines. <Directory /var/www/> ...
ASKN's user avatar
  • 133
3 votes
1 answer
3k views

Apache: Truncated or oversized response headers after graceful restart

After graceful restart, some python wsgi processes fail with 500 (internal server error): [20:06:33] [mpm_prefork:notice] AH00171: Graceful restart requested, doing restart [20:06:36] [wsgi:error] ...
guettli's user avatar
  • 3,823
3 votes
1 answer
3k 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 ...
Tom's user avatar
  • 2,662
3 votes
1 answer
3k views

How do I install mod_wsgi in Apache for python 3.5 on CentOS 7 if apxs2 is missing?

I am currently trying to install mod_wsgi 4.4.21 into Apache 2.4 for a Python 3.5 web server on CentOS 7. Under "Configuring The Source Code" in the Quick Installation Guide, it says this: On some ...
gla3dr's user avatar
  • 151
3 votes
2 answers
1k 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 ...
Dan Benamy's user avatar
3 votes
1 answer
1k 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 ...
Evgeny's user avatar
  • 599
3 votes
1 answer
2k views

Python background task thread lock error with mod_wsgi

I have a small python web application built on the Flask framework and deployed with mod_wsgi to apache. The application is scheduling a background task with apscheduler that runs every couple of ...
totokaka's user avatar
  • 202
3 votes
1 answer
574 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 wsgiref....
jbbarnes77's user avatar

1
2 3 4 5
9