Skip to main content

Questions tagged [wsgi]

Web Server Gateway Interface is a specification for web servers and application servers to communicate with web applications. It is a Python standard, described in detail in PEP 333.

Filter by
Sorted by
Tagged with
20 votes
1 answer
3k views

Recommended Nginx + WSGI Configurations

Please explain pros/cons when using the different Nginx WSGI interfaces? Please explain in detail what differentiates each configuration? Which configuration should scale the best? If relevant, what ...
cmcginty's user avatar
  • 1,311
17 votes
2 answers
23k views

Wiring uWSGI to work with Django and nginx on Ubuntu 16.04

I am trying to follow this tutorial to setup uWSGI with Django and nginx on Ubuntu16.04. It all works fine up until the very last step (oh the irony...) where I try to execute this command: sudo ...
Vlad Schnakovszki's user avatar
16 votes
4 answers
23k views

Getting client denied when accessing a wsgi graphite script

I'm trying to set up graphite on my Mac OS X 10.7 lion, i've set up apache to call the python graphite script via WSGI, but when i try to access it, i get a forbiden from apache and in the error log. ...
Dr BDO Adams's user avatar
9 votes
1 answer
10k views

Where do I place the WSGIPythonHome directive in the httpd.conf file?

I have searched the entire file for a place to put the directive, but I have no idea where to put it, and the internet doesn't seem to have a good answer either, or maybe I'm just not good at ...
jasonaburton's user avatar
9 votes
1 answer
9k views

Apache/wsgi "Script timed out before returning headers"

I have a custom Django app that's becoming unresponsive roughly every 5,000 requests. In the apache logs, I see see the following: Apr 13 11:45:07 www3 apache2[27590]: **successful view render here** ...
Chase Seibert's user avatar
8 votes
4 answers
10k views

gunicorn + django + nginx unix://socket failed (11: Resource temporarily unavailable)

Running very high volume traffic on these servers configured with django, gunicorn, supervisor and nginx. But a lot of times I tend to see 502 errors. So I checked the nginx logs to see what error and ...
user1068118's user avatar
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.5k
7 votes
2 answers
42k views

uWSGI cannot find "application" using Flask and Virtualenv

Using uWSGI to serve a simple wsgi app, (a simple "Hello, World") my configuration works, but when I try to run a Flask app, I get this in uWSGI's error logs: current working directory: /opt/python-...
skyler's user avatar
  • 465
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,266
7 votes
1 answer
8k views

How to have apache handle .well-known/acme-challenge and still have / passed to wsgi

In order to support automatic LetsEncrypt certificate renewal certbot uses the --apache handler. e.g. certbot renew --apache This handler installs a temporary VirtualHost for */.well-known/acme-...
Jay M's user avatar
  • 398
7 votes
1 answer
42k 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
2 answers
7k views

Why put a reverse proxy in front of a WSGI server?

A typical configuration for deploying a WSGI application includes a WSGI server (such as uWSGI or Gunicorn) behind a general-purpose web server (like nginx) that acts as a reverse proxy. One major ...
Vasiliy Faronov's user avatar
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
1 answer
2k views

Upstart vs Supervisord to manage WSGI processes

Thoughts? I'm running Ubuntu 10.0.4
Dick Brouwer's user avatar
5 votes
1 answer
3k views

how to configure ISPConfig for mod_python or mod_wsgi? [closed]

how to configure ISPConfig for mod_python or mod_wsgi for django like apps deployement?
shahjapan's user avatar
  • 141
5 votes
1 answer
22k views

How do I debug this Nginx to uWSGI timeout?

I'm running a database-backed web site that receives very little traffic. However, once or twice day, a request will timeout and I'll see this (or a similar) error in Nginx's error.log: 2013/06/13 18:...
skyler's user avatar
  • 465
4 votes
1 answer
3k views

UWSGI and NGINX for Python Apps on Ubuntu 11.10

I am trying to find an optimal way to set up my server to use NGINX and UWSGI to serve python applications. The following has worked so far: Initial setup: sudo apt-get install nginx uwsgi uwsgi-...
knpwrs's user avatar
  • 429
4 votes
2 answers
3k views

Apache mpm worker + wsgi Python/Django workers stuck

Our Apache+Django server has the problem that workers get stuck. It's an mpm worker model, and after some time, each process that serves some dozen worker threads has all its workers frozen: # ...
Halfgaar's user avatar
  • 8,234
4 votes
1 answer
2k views

What's the difference between running Python web applications in normal way and running them under wsgi?

I know that in order to run a Python web application(an application developed with frameworks such as Flask & Django) on the server, you need to deploy it using things such as uwsgi, wsgi.. ...
userofserver's user avatar
3 votes
1 answer
3k views

Nginx + Django + FastCGI WSGI error? (Non fatal)

I am running django on top of nginx with fastcgi. When i do runfcgi, I am seeing these errors: python manage.py runfcgi daemonize=false host=127.0.0.1 port=8000 WSGIServer: missing FastCGI param ...
xjq233p_1's user avatar
  • 243
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
2 answers
2k views

Getting compiled Python mod_wsgi module working on Apache server with SElinux enforcing mode

Trying to get my Python/Django app working on a RedHat Server in an ideal setting. Could not use the mod_wsgi from the package as it has some dependency issue when checking for modules in my virtual ...
Evolutionary's user avatar
3 votes
2 answers
1k views

Python Django sites on Apache+mod_wsgi with nginx proxy: highly fluctuating performance

I have an Ubuntu 10.04 box running several dozen Python Django sites using mod_wsgi (embedded mode; the faster mode, if properly configured). Performance highly fluctuates. Sometimes fast, sometimes ...
Halfgaar's user avatar
  • 8,234
3 votes
1 answer
2k views

What's the difference between WSGI <app> and <module>?

I followed these instructions to serve Python (Web2Py) via uWSGI. However, the web server returned an error: uWSGI Error Python application not found until I modified the config.xml config file ...
Leftium's user avatar
  • 303
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
1k views

Attempting to run Django with start Apache2 mod_wsgi on Ubuntu Lucid Lynx without success

I have a small vps with a minimum install of ubuntu lucid-lynx with about 256mb memory, it's newly installed with nothing special running on it. I'm trying to deploy django to it, while I'm ...
Kit Sunde's user avatar
  • 946
3 votes
1 answer
17k views

PassEnv does not find ENV variables

I've got this /etc/profile.d/myfile.sh: export MYVAR=myval I also have a PassEnv MYVAR line in a <virtualhost> section of an apache conf dir. That lets me do things like: $ echo $MYVAR myval ...
quodlibetor's user avatar
3 votes
1 answer
1k views

Apache Benchmark is slow from public network, magnitudes faster locally. What are some things I do to speed this up?

I am testing my Linode Ubuntu 14 64bit server out, it's the most basic server available from them. I am using Apache Benchmark to test the server, as well as a multithreaded script I wrote in Python, ...
scape's user avatar
  • 365
3 votes
1 answer
833 views

IPC overhead in a (nginx -> uwsgi -> wsgi application) architecture?

Recently I'm setting up some Python website and it seems the architecture nginx -> uwsgi -> wsgi application is an obvious choice in Python world these days. (Actually I'm migrating a MoinMoin ...
xiaq's user avatar
  • 133
3 votes
1 answer
2k views

Graphite not running

I'm currently trying to install graphite 0.9.9 on a gentoo box using these instructions from the graphite wiki. Essentially, it fronts graphite using apache and mod_wsgi. Everything seems to have ...
River's user avatar
  • 143
2 votes
1 answer
4k views

How can Django/WSGI and PHP share / on Apache?

I have a server running an established PHP site, as well as some Django apps. Currently, a VirtualHost set up for PHP listens on port 80, and requests to certain directories are proxied to a ...
Mark Snidovich's user avatar
2 votes
1 answer
3k views

Apache running Python with mod_wsgi

I need help setting up a local Apache2 to run Python. Got it to work just fine with html, php and mysql on my Mac running Mountain Lion. Python running. Installed mod_wsgi through MacPorts and ...
MartinR's user avatar
  • 123
2 votes
1 answer
2k views

How can I control log messages for Apache (specifically, auth_mysql module & WSGI)?

On an Ubuntu 10.04 server w/ Apache2, I have auth_mysql turned on, and I am getting [debug] messages showing up. How can I turn these off? I'm guessing there is a way to turn this off for the module,...
Dolan Antenucci's user avatar
2 votes
1 answer
994 views

Mutli-Site uWSGI config

I have about a dozen small Django sites I want to run using Nginx and uWSGI. They are on a 4-core server with 8 gigs of ram. Should each site be configured on its own socket and how can I control the ...
Jason Christa's user avatar
2 votes
1 answer
542 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 ...
quarry32's user avatar
  • 255
2 votes
1 answer
303 views

How to install moinmoin-2 on dreamhost

How to install moinmoin-2 on dreamhost? I'm putting this here, so I can find it in the future. Maybe it is useful to other people too. I found it challenging because: it needs python2.7, and ...
Hugh Perkins's user avatar
  • 1,095
2 votes
2 answers
2k views

How do I get Apache to run Python 2.7 rather than 2.5?

How do I get Apache to run 2.7 rather than 2.5? I'm configuring Apache to use mod_wsgi with Django and Python 2.7, but error logs show Apache is using Python 2.5.2 and can't find django.core.handlers....
chernevik's user avatar
  • 725
2 votes
1 answer
6k views

HTTP 500 error from POST reuqest to django vai WSGI and apache

Ive got a Django web application setup with mod_wsgi and apache2 on ubuntu 9.10 Im using the following code to o a user authentication via a HTTP post for another part of my site. All it required ...
Mark's user avatar
  • 573
2 votes
0 answers
2k views

Timeout when reading response headers from daemon process 'horizon': /opt/stack/horizon/openstack_dashboard/wsgi.py

When trying to allocate a floating IP in openstack (on Ubuntu 18.04.1), I'm getting this error. "Danger: There was an error submitting the form. Please try again" In /var/log/apache2/horizon_error....
Basile Crumeyrolle's user avatar
2 votes
0 answers
184 views

Apache with python wsgi reaches MaxRequestWorkers and becomes unresponsive

I have an application running on apache under Ubuntu (tried 12 and 14) using python via WSGI. When I get a little too much traffic I see "server reached MaxRequestWorkers..." in the error log, I will ...
in need of help's user avatar
2 votes
0 answers
2k views

recv not ready (11: Resource temporarily unavailable)) (nginx/1.1.19, supervisorctl, gunicorn )

I have site on Ubuntu 12.04.5 LTS, django (supervisorctl, gunicorn). It work 1 year without problems, but today my zabbix server sending me messages about alerts (every 3-7 minutes) about timeout (for ...
Patjomkin's user avatar
2 votes
0 answers
620 views

Configuring mod_wsgi daemon mode processes and threads

I am planning to use mpm_worker or mpm_event with daemon mode of mod_wsgi. How to configure processes and threads of WSGIDaemonProcess directive for the optimal performance of apache 2.4.9
eldos's user avatar
  • 241
2 votes
1 answer
1k views

Python, IIS scripts, and user accounts

This isn't a question on my specific problem, as I've got that more or less solved, but about IIS/Python and user accounts in general. I have python scripts that I'm running with IIS 7.5 (Mercurial ...
carpat's user avatar
  • 1,065
1 vote
3 answers
2k views

WSGI cannot access a file, but permissions are correct

I am debugging a problem where MoinMoin on CentOS is throwing a permissions error, but I can't track down where the problematic file / directory is. I ran strace -vp <pid> on the apache pid; ...
Mike Pennington's user avatar
1 vote
3 answers
2k views

Python app server & web server co-existing?

I have a site example.com that runs off a 'normal' web server ie at the moment Apache but looking to go for a less RAM intensive alternative in future so I don't want mod_WSGI on apache. Shortly I ...
citronic's user avatar
  • 143
1 vote
3 answers
1k views

httpd.service Cannot connect to database Centos 7

I'm trying to connect to PostgreSQL Unix domain socket from a python web application with mod_wsgi. Relevant system components: CentOS 7 x64 Python 2.7.5 SELinux disabled PostgreSQL is listening on ...
xav's user avatar
  • 21
1 vote
2 answers
5k views

Tuning django based site deployed using apache wsgi for better performance

I'm running django application using apache+mod_wsgi, I have setup 6 medium ubuntu servers on Amazon ec2 in which 2 for mongo and 4 for django and apache, using ebs for postgresql and configured a ...
user969923's user avatar
1 vote
4 answers
3k views

Nginx + uWSGI on a fresh Ubuntu install - bind error port 80

I know this is a common problem usually having to do with apache or another service already running on port 80 and I have done a lot of searching and running netstat and still have not figured out why ...
knuckfubuck's user avatar
1 vote
1 answer
11k views

How to deploy a WSGI/Python app behind Nginx on Windows?

Coming from the Linux environment, I'll try to be as accurate as possible with Windows concepts I clearly don't master. Here's my current situation: I have a functional Windows (10 pro x64) Nginx ...
Glandalf313's user avatar