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
46
votes
7 answers

Apache or Nginx to serve Django applications?

I want to deploy a Django web application, and hence I need to choose a web server to serve the Python files. I should mention that my production site will be on a single server, which will host the database and the web server. As momentum picks, I…
Barry Steyn
  • 1,563
  • 3
  • 19
  • 25
45
votes
4 answers

Multiple mod_wsgi apps on one virtual host directing to wrong app

I'm trying to get two (or more) Django applications set up at subdirectories under the same domain, e.g.: http://example.com/site1/ http://example.com/site2/ I know that normally this works fine by setting up an apache virtualhost like…
Gabriel Hurley
  • 39,690
  • 13
  • 62
  • 88
45
votes
3 answers

How to install & configure mod_wsgi for py3

I installed & configured mod_wsgi for python2.7 but now I would also like to have mod_wsgi for py3 I'm in ubuntu 12.04 My apache conf file looks like this for py2.7 : WSGIProcessGroup my_web …
Lazik
  • 2,480
  • 2
  • 25
  • 31
44
votes
10 answers

error: can't start new thread

I have a site that runs with follow configuration: Django + mod-wsgi + apache In one of user's request, I send another HTTP request to another service, and solve this by httplib library of python. But sometimes this service don't get answer too…
Oduvan
  • 2,607
  • 3
  • 24
  • 24
43
votes
4 answers

Why is mod_wsgi not able to write data? IOError: failed to write data

What could be causing this error: $ sudo tail -n 100 /var/log/apache2/error.log' [Wed Dec 29 15:20:03 2010] [error] [client 220.181.108.181] mod_wsgi (pid=20343): Exception occurred processing WSGI script '/home/username/public_html/idm.wsgi'. …
BryanWheelock
  • 12,146
  • 18
  • 64
  • 109
41
votes
5 answers

Python - why can I import modules without __init__.py at all?

I'm new to Python and I still can't get my head around why we need a __init__.py file to import modules. I have gone through other questions and answers, such as this. What confuses me is that I can import my modules without __init__py, so why do I…
Run
  • 54,938
  • 169
  • 450
  • 748
40
votes
3 answers

500 Error without anything in the apache logs

I am currently developing an application based on flask. It runs fine spawning the server manually using app.run(). I've tried to run it through mod_wsgi now. Strangely, I get a 500 error, and nothing in the logs. I've investigated a bit and here…
exhuma
  • 20,071
  • 12
  • 90
  • 123
37
votes
3 answers

Certbot Apache error "Name duplicates previous WSGI daemon definition."

On my Ubuntu 16.04 server, I have an Apache conf file at /etc/apache2/sites-enabled/000-default.conf, which looks like this (abbreviated): WSGIApplicationGroup %{GLOBAL} ServerName example.com WSGIDaemonProcess myprocess…
Josh
  • 2,790
  • 26
  • 30
37
votes
4 answers

Apache + mod_wsgi vs nginx + gunicorn

I want to deploy a django site (it is the open source edx code on github). I am faced with choosing between using Apache with mod_wsgi nginx with gunicorn I have used Apache with mod_wsgi and it's cool enough, but i have no experience with the…
SamAko
  • 3,485
  • 7
  • 41
  • 77
35
votes
8 answers

Django memory usage going up with every request

I moved my first Django project from DjangoEurope to Webfaction, and that started an issue looking like a memory leak. With every single request memory usage of the server process goes up about 500kb. It never goes down. This goes on until…
Ludwik Trammer
  • 24,602
  • 6
  • 66
  • 90
34
votes
10 answers

ImportError: No module named django.core.handlers.wsgi in install django mod_wsgi config on apache

I tried to install django to work with apache and mod_wsgi but get this error: ImportError: No module named django.core.handlers.wsgi, I'v read that it may be user error... On the console (ssh), with root access, I don't have any problems…
laurent
  • 660
  • 2
  • 8
  • 19
32
votes
3 answers

Django long running asynchronous tasks with threads/processing

Disclaimer: I do know that there are several similar questions on SO. I think I've read most if not all of them, but did not find an answer to my real question (see later). I also do know that using celery or other asynchronous queue systems is the…
Stefano
  • 18,083
  • 13
  • 64
  • 79
32
votes
3 answers

Django + apache & mod_wsgi: having to restart apache after changes

I configured my development server this way: Ubuntu, Apache, mod_wsgi, Python 2.6 I work on the server from another computer connected to it. Most of the times the changes don't affect the application unless I restart Apache. In some cases the…
nemesisdesign
  • 8,159
  • 12
  • 58
  • 97
32
votes
5 answers

403 Forbidden error with Django and mod_wsgi

I created Django project in home directory so it is in home directory. Setup Django Verison : 1.5.1 Python Version : 2.7.5 mod_wsgi Version: 3.4 Home Directory : /home/aettool Contents of /home/aettool/aet/apache/django.wsgi import os import…
g4ur4v
  • 3,210
  • 5
  • 32
  • 57
31
votes
2 answers

Issues in urls when running Django in subdirectory or say suburl

I am trying to run Django inside WordPress like WordPress at main url www.wptesting.com and Django at suburl www.wptesting.com/django . Django main root url Is working fine at www.wptesting.com/django but its suburl e.g., admin is not working as it…
Inforian
  • 1,716
  • 5
  • 21
  • 42