Questions tagged [mod-wsgi]

The mod_wsgi module is a python WSGI adapter module for Apache.

The mod_wsgi module is a python WSGI adapter module for Apache. For details on the official channel for getting mod_wsgi help, see http://modwsgi.readthedocs.io/en/develop/finding-help.html.

3241 questions
29
votes
2 answers

Apache SetEnv not working as expected with mod_wsgi

In a flask application I wrote, I make use of an external library which can be configured using environment variables. Note: I wrote this external library myself. So I could make changes if necessary. When running from the command line an running…
exhuma
  • 20,071
  • 12
  • 90
  • 123
29
votes
2 answers

Install mod_wsgi on Ubuntu with Python 3.6, Apache 2.4, and Django 1.11

How do I get mod_wsgi for Apache2 that was compiled for Python 3.6.1? (or any future Python version) I am using a Python 3.6.1 virtual environment with Django 1.11 and Everything is working according to the Apache error log except that mod_wsgi for…
JxAxMxIxN
  • 1,711
  • 1
  • 17
  • 20
28
votes
3 answers

python sqlite3 OperationalError: attempt to write a readonly database

I am trying to run a Flask REST service on CentOS Apache2 using WSGI. The REST service requires a very small storage. So i decided to use SQLite with sqlite3 python package. The whole application worked perfectly well on my local system and on the…
Shivaprasad Bhat
  • 555
  • 1
  • 6
  • 13
27
votes
2 answers

AWS Elastic Beanstalk - Script timed out before returning headers: application.py

I have an existing Elastic Beanstalk flask app on AWS that occasionally will not initialize and gives the following error: [Mon Jan 23 10:06:51.550205 2017] [core:error] [pid 7331] [client 127.0.0.1:43790] script timed out before returning headers:…
user2752159
  • 1,182
  • 3
  • 13
  • 29
26
votes
2 answers

Issues installing mod_wsgi - cannot find Makefile.in

I'm trying to rebuild mod_wsgi and am running into this issue? Does anyone know what's going on here? /tmp/mod_wsgi-3.4# ls config.log LICENCE posix-ap2X.mk.in win32-ap22py31.mk config.status Makefile.in README configure …
babbaggeii
  • 7,577
  • 20
  • 64
  • 118
26
votes
3 answers

Python, WSGI, multiprocessing and shared data

I am a bit confused about multiproessing feature of mod_wsgi and about a general design of WSGI applications that would be executed on WSGI servers with multiprocessing ability. Consider the following directive: WSGIDaemonProcess example…
Zaur Nasibov
  • 22,280
  • 12
  • 56
  • 83
25
votes
3 answers

Installing mod_wsgi for Python3 on Ubuntu

Could anyone give me a clear set of instructions for installing mod_wsgi on Ubuntu for Python 3? I did get Flask & mod_wsgi successfully using Python3, and for a brief moment felt happy. ...until I looked at Apache's log and realised that I've run…
P i
  • 29,020
  • 36
  • 159
  • 267
25
votes
6 answers

How to get the version of wsgi_mod which apache used?

I am using ubuntu 12.041 and installed apache through apt-get. I don't know what version of mod_wsgi i am using albeit I google about it. All I found is you can use apachctl to restart you apache and you would get something like "Apache/2.2.2…
Chandler.Huang
  • 873
  • 3
  • 12
  • 24
25
votes
3 answers

Deploying multiple django apps on Apache with mod_wsgi

I want to deploy two different django apps in the same host: The first will correspond to the url /site1 and the second to the url /site2. Here's my configuration: LoadModule wsgi_module modules/mod_wsgi.so WSGIScriptAlias /site1…
Serafeim
  • 14,962
  • 14
  • 91
  • 133
24
votes
4 answers

I am getting "Invalid command 'WSGIScriptAlias' " error while starting Apache

I want to deploy my Django project to EC2 server. I installed mod_wsgi. And made configuration like in the tutorial of django. I am getting the following: Invalid command 'WSGIScriptAlias', perhaps misspelled or defined by a module not included in…
Burak
  • 5,706
  • 20
  • 70
  • 110
24
votes
6 answers

Django Webfaction 'Timeout when reading response headers from daemon process'

My Django app on my production server hosted on Webfaction was working fine until I just tried to restart it after pushing a change to the settings.py file. I ran apache2/bin/restart as usual. Then I tried to access my app on my browser, and I got…
Nick
  • 1,864
  • 5
  • 27
  • 49
24
votes
6 answers

Name duplicates previous WSGI daemon definition

I'm changing the domain name of a site. For a period I want the old domain name and the new domain name to point to the site. I'm running a Python Django site. My original Apache2 conf works fine and the basis is:
HenryM
  • 5,557
  • 7
  • 49
  • 105
24
votes
3 answers

How can I activate a pyvenv virtualenv from within python? (activate_this.py was removed?)

I'm using Python 3.4, and having created a pyvenv, I'm looking to activate it from within a python process. With virtualenv, I used to use activate_this.py, but that appears to be gone in pyvenv. Is there now an easy way to effectively change the…
Chris Cooper
  • 17,276
  • 9
  • 52
  • 70
24
votes
6 answers

Script timed out before returning headers: wsgi.py on elastic beanstalk

I'm trying to deploy a Django application to Elastic Beanstalk. When I visit the page it never loads. The logs say: Script timed out before returning headers: wsgi.py I can ssh into the server and run manage.py runserver and then curl…
Meistro
  • 3,664
  • 2
  • 28
  • 33
24
votes
3 answers

mod_wsgi: ImportError: No module named 'encodings'

I'm using Apache 2.2.15 on CentOS 6.5. I'm trying to set up a Django app using mod_wsgi. I'm using a virtual environment, and mod_wsgi was configured with --with-python=/path/to/virtualenv/bin/python3.4. I've added this to my…
tao_oat
  • 1,011
  • 1
  • 15
  • 33