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
17
votes
1 answer

mod_wsgi isn't honoring WSGIPythonHome

I'm trying to get WSGI to run with a virtualenv setup. I have the virtualenv all working right: (virtualenv)dev:/var/www/app$ which python /var/www/virtualenv/bin/python (virtualenv)dev:/var/www/app$ python Python 2.6.1 (r261:67515, Dec 5 2008,…
zigdon
  • 14,573
  • 6
  • 35
  • 54
17
votes
3 answers

mod_wsgi and multiple installations of python

This is kind of a continuation of this question, but it has deviated so I started a new one. I'd like to use Python 2.5 instead of OS X's default 2.6. I've set this up for my terminal and whatnot, but whenever apache runs it gives me the following…
Brian D
  • 9,863
  • 18
  • 61
  • 96
17
votes
6 answers

Flask - WSGI - No module named 'flask'

I've been following Sentdex' Flask tutorial. He's using a Venv to set up his Flask, but didn't set his Python up to work with a Venv. I've tried installing Flask globally - yet it still doesn't work. Trying to browse to the server returns a 500…
Davixxa
  • 441
  • 1
  • 4
  • 9
16
votes
5 answers

Apache mod_wsgi error: Forbidden You don't have permission to access / on this server

I'm using Ubuntu 10.04. I create a django project under /home/wong2/Code/python/django2/ named atest and create a wsgi file setting.wsgi in the same directory Here is the content of setting.wsgi : import os import sys path =…
wong2
  • 34,358
  • 48
  • 134
  • 179
16
votes
2 answers

TypeError: sequence of byte string values expected, value of type str found

I'm trying to run a simple "hello world" application using mod_wsgi for Python 3. I'm using Fedora 23. Here's my Apache virtual host configuration: ServerName localhost ServerAdmin admin@localhost # ServerAlias…
Sumit
  • 2,242
  • 1
  • 24
  • 37
16
votes
1 answer

Hello World in mod_wsgi

After failing repeatedly in my quest to get my flask application to run on Apache using mod_wsgi I decided to try running the hello world example. Here is what I have - Directory Structure (I changed the apache default /var/www to ~/public_html) -…
Prakhar
  • 3,486
  • 17
  • 44
  • 61
15
votes
4 answers

mod_wsgi force reload modules

Is there a way to have mod_wsgi reload all modules (maybe in a particular directory) on each load? While working on the code, it's very annoying to restart apache every time something is changed. The only option I've found so far is to put modname =…
Ian
  • 24,116
  • 22
  • 58
  • 96
15
votes
3 answers

How to install mod_wsgi into Apache on Windows?

Other similar answers are out of date or focus on a particular error and not the whole process. What is the full installation process of mod_wsgi into an Apache installation on Windows 10?
Robin De Schepper
  • 4,942
  • 4
  • 35
  • 56
15
votes
2 answers

Python POST data using mod_wsgi

This must be a very simple question, but I don't seem to be able to figure out. I'm using apache + mod_wsgi to host my python application, and I'd like to get the post content submitted in one of the forms -however, neither the environment values,…
Silver Dragon
  • 5,480
  • 6
  • 41
  • 73
15
votes
1 answer

How to reload new update in Django project with Apache, mod_wsgi?

I am making a project using the Django framework. I have hosted a test server with Apache+mod_wsgi. When I change some lines of code, I upload the file and test it in a browser. But the new changes are not shown unless I reload/restart…
Elisa
  • 6,865
  • 11
  • 41
  • 56
15
votes
3 answers

python flask before_request exclude /static directory

Thanks to the answer below, I have a before_request function which redirects a user to /login if they have not yet logged in: flask before request - add exception for specific route Here is a copy of my before_request: @app.before_request def…
SeanPlusPlus
  • 8,663
  • 18
  • 59
  • 84
14
votes
1 answer

Apache + mod_wsgi interaction

Before posting this, I have read quite a few resources online, including the mod_wsgi wiki, but I am confused about how exactly Apache processes/threads interact with mod_wsgi. This is my current understanding: Apache can be configured to run such…
jeffreyveon
  • 13,400
  • 18
  • 79
  • 129
14
votes
4 answers

Getting Flask to use Python3 (Apache/mod_wsgi)

I've got a basic "hello world" Flask app running. I'm on Ubuntu 14.04, using Apache 2.4. I've installed mod_wsgi. I've created a ~/web/piFlask/venv/ to hold a virtualenv-created Python2 with flask installed. However, I wish to have my flaskapp…
P i
  • 29,020
  • 36
  • 159
  • 267
14
votes
2 answers

mod_wsgi for correct version of python3

I am setting up a Django server on Ubuntu 12.04 LTS, and I am having trouble installing mod-wsgi with the correct version of python. I have built my site locally with python 3.3, and Ubuntu 12.04 comes bundled with python 3.2. I suppose I could, but…
Hat
  • 1,691
  • 6
  • 28
  • 44
14
votes
3 answers

Apache 403 while serving Django static files

I've looked through a lot of the related posts but nothing seems to be helping. Relevant Info: Django version - 1.4 Apache version - 2.2 Python version - 2.7 OS - Xubuntu 12.04 DB - Mysql I'm trying to get Apache to serve both the django app and…
noah
  • 424
  • 1
  • 4
  • 10