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
276
votes
6 answers

Difference between socket and websocket?

I'm building web app that needs to communicate with another application using socket connections. This is new territory for me, so want to be sure that sockets are different than websockets. It seems like they're only conceptually similar. Asking…
Jonathon
  • 2,793
  • 2
  • 15
  • 5
193
votes
40 answers

Django stops working with RuntimeError: populate() isn't reentrant

I've been developing a Django web application deployed on an Apache server with WSGI, and everything has been going smoothly. Today, I made some minor changes to my app's admin.py in an attempt to customize the build-in Django Admin interface, and…
Edward
  • 5,942
  • 4
  • 38
  • 55
103
votes
8 answers

Python : How to parse the Body from a raw email , given that raw email does not have a "Body" tag or anything

It seems easy to get the From To Subject etc via import email b = email.message_from_string(a) bbb = b['from'] ccc = b['to'] assuming that "a" is the raw-email string which looks something like this. a = """From root@a1.local.tld Thu Jul 25…
user2621078
101
votes
10 answers

Static files in Flask - robot.txt, sitemap.xml (mod_wsgi)

Is there any clever solution to store static files in Flask's application root directory. robots.txt and sitemap.xml are expected to be found in /, so my idea was to create routes for them: @app.route('/sitemap.xml', methods=['GET']) def sitemap(): …
biesiad
  • 2,258
  • 4
  • 19
  • 16
100
votes
13 answers

"make_sock: could not bind to address [::]:443" when restarting apache (installing trac and mod_wsgi)

I'm trying to install trac and mod_wsgi over SSL. I tried to manually install it, but that didn't work out so well so I started to follow this: trac-on-ubuntu I skipped the svn part because I'd like to use git instead. After the first edit of…
sharkfin
  • 3,827
  • 4
  • 23
  • 22
78
votes
26 answers

Unable log in to the django admin page with a valid username and password

I can’t log in to the django admin page. When I enter a valid username and password, it just brings up the login page again, with no error messages This question is in the django FAQ, but I've gone over the answers there and still can't get past the…
monkut
  • 42,176
  • 24
  • 124
  • 155
71
votes
19 answers

Target WSGI script cannot be loaded as Python module

I am trying to deploy mod_wsgi with apache to run a django application but I am getting an error 500 internal server error The apache logs shows: [Thu Jun 23 14:01:47 2011] [error] [client 152.78.95.64] mod_wsgi (pid=16142): Exception occurred…
Adam Thomas
  • 711
  • 1
  • 5
  • 4
69
votes
4 answers

In production, Apache + mod_wsgi or Nginx + mod_wsgi?

What to use for a medium to large python WSGI application, Apache + mod_wsgi or Nginx + mod_wsgi? Which combination will need more memory and CPU time? Which one is faster? Which is known for being more stable than the other? I am also thinking to…
user11617
63
votes
2 answers

multiple django sites with apache & mod_wsgi

I want to host several sites with under the same server which uses Debian 5, say I have site1, site2 and site3, and assume my ip is 155.55.55.1: site1: 155.55.55.1:80 , script at /opt/django/site1/ site2: 155.55.55.1:8080, script at…
Hellnar
  • 62,315
  • 79
  • 204
  • 279
62
votes
3 answers

Debugging Apache/Django/WSGI Bad Request (400) Error

My simple Django app worked fine in debug mode (manage.py runserver), and works under WSGI+Apache on my dev box, but when I pushed to EC2 I began receiving intermittent (10-80% of the time) errors of Bad Request (400) for any URLs I try to view…
mrisher
  • 1,062
  • 2
  • 9
  • 15
60
votes
7 answers

Django persistent database connection

I'm using django with apache and mod_wsgi and PostgreSQL (all on same host), and I need to handle a lot of simple dynamic page requests (hundreds per second). I faced with problem that the bottleneck is that a django don't have persistent database…
HardQuestions
  • 4,075
  • 7
  • 34
  • 39
53
votes
3 answers

How to install python developer package?

I am trying to get mod_wsgi 3.3 to work. When I run make it is telling me that I am missing the Python developer package. How do I get and install the Python developer package? The error I get is as follows: mod_wsgi.c:135:20: error: Python.h: No…
David
  • 14,205
  • 20
  • 97
  • 144
53
votes
5 answers

Invalid command 'WSGIScriptAlias', perhaps misspelled or defined by a module not included in the server configurationAction 'configtest' failed

I got the below error while I was configuring CKAN DataPusher. Invalid command 'WSGIScriptAlias', perhaps misspelled or defined by a module not included in the server configurationAction 'configtest' failed. How can I fix this?
Techie
  • 44,706
  • 42
  • 157
  • 243
49
votes
4 answers

Apache not serving django admin static files

Let me thanks you guys at the Stack Overflow community for helping me with various Django and Apache (with mod_wsgi) errors. I've asked about 5 related questions so far and now I'm getting closer and closer to getting my content out on a production…
hobbes3
  • 28,078
  • 24
  • 87
  • 116
49
votes
4 answers

mod_wsgi, mod_python, or just cgi?

I've been playing around with my own webserver (Apache+Ubuntu) and python. From what I've seen there are 3(?) main ways of doing this: Apache configured to handle .py as cgi Apache configured to use mod_python that is now outdated(?) Apache…
Wayne Werner
  • 49,299
  • 29
  • 200
  • 290
1
2 3
99 100