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
1
vote
1 answer

Apache2 whith mod_wsgi python3 'TypeError:' and return error 500

My 'controller.py' script #!/usr/bin/env python # -*- coding: utf-8 -*- import os def application(environ, start_response): # the ouput string to respuesta var respuesta = "

Página web construida con Python!!!

" #…
Trimax
  • 2,413
  • 7
  • 35
  • 59
1
vote
1 answer

XAMPP Apache not working after installing mod_wsgi

Good day. I am currently trying to host my Django website locally using XAMPP Apache. I have followed several tutorials but one of those works. I was wondering if you could tell me what are the steps I have missed or did wrong. Here is the specs of…
jonilyn2730
  • 465
  • 9
  • 21
1
vote
0 answers

Customise apache.conf - set Timeout

I'm deploying a Flask web service in a container using Apache and mod_wsgi. Is there a way to control the Apache timeout parameter (in /etc/apache2/apache2.conf) in the mod_wsgi configuration file? I note that when the container gets built this…
D. Joe
  • 63
  • 1
  • 10
1
vote
1 answer

Initialising a Flask app running with Apache and mod_wsgi

I've got a Flask app running under Apache using mod_wsgi. The app needs to do do some initialisation, including setting some top-level variables that need to be accessible inside the request handlers, before it receives any requests. At the moment…
D. Joe
  • 63
  • 1
  • 10
1
vote
2 answers

Issue with imports when using WSGI in EC2 Instance to Host Flask App

I am trying to run a very simple Flask app off an EC2 instance using mod_wsgi. My apache error log keeps showing "ImportError: No module named pandas, referer: http://xxxxx" Despite the fact that I have pandas installed. For reference, pip freeze…
purdoo
  • 992
  • 1
  • 12
  • 16
1
vote
2 answers

apache2 mod_wsgi crashes when importing pyodbc

Operating system - Ubuntu Server 14.04 on Azure VM Tried with different versions of python (3.4.3, 3.6.0), apache and mod_wsgi. Installed MS Native ODBC driver using instructions from here …
Vahagn
  • 386
  • 2
  • 21
1
vote
1 answer

Apache/mod_wsgi/django/arch linux woes since 64 bit upgrade, despite being able to import all libraries

I've been trying to figure out what's causing this issue for hours but with no luck. Since migrating my arch linux installation to 64 bit I've found my django sites don't work, with error 500. I'm using python2, which is 64 bit: >>> import…
James
  • 363
  • 1
  • 4
  • 14
1
vote
0 answers

Django WSGI error using Apache2

I'm running Django in VPS using Apache2 and wsgi but I am getting a 'no module named: Django' error when I access the domain, what could be wrong? here's my default.conf in apache2, . . . Alias /static…
weather api
  • 738
  • 2
  • 8
  • 17
1
vote
1 answer

Django strange behavior: infinite loading all views, but django is working

2 years experience with Django (1.8.12, Ubuntu 14.04) and faced this problem 1st time. After some time (not sure why) i come to my site and tried to load some page: result is infinite loading all views including admin panel (cannot login) and all…
Vic Nicethemer
  • 1,081
  • 3
  • 16
  • 38
1
vote
2 answers

How to set LD_LIBRARY_PATH with apache

I'm attempting to run a flask app with mod_wsgi on Ubuntu 16.04. I'm having a problem setting the $LD_LIBRARY_PATH$ environment variable. I'm able to set this in my ~.bashrc file, and as a result I am able to import all my libraries and dependencies…
user3543300
  • 499
  • 2
  • 9
  • 27
1
vote
1 answer

web.py hosted on Apache does not run code in side if __name__ == "__main__":

I have this same code which I have mentioned in this question of mine. Now I have hosted the same web.py app on Apache. But when I start Apache the code inside if __name__ == "__main__": is not executed. Is it possible to run backgroud…
Marlon Abeykoon
  • 11,927
  • 4
  • 54
  • 75
1
vote
1 answer

OpenCV 3.2 hangs on cv2.cvtColor

I have a set of web APIs that I run on Apache with WSGI for image processing. Recently I upgraded my OpenCV to 3.2 (I'm using Python 2.7) OpenCV seems to work fine when I run it from console, but when I make web API calls openCV hangs on converting…
1
vote
1 answer

Adding custom header on serving static files with Apache

Is it possible to send additional custom headers (for example with a wsgi app) before Apache serves static content (image/js/css) ?
vonPetrushev
  • 5,457
  • 6
  • 39
  • 51
1
vote
0 answers

500 Error when starting Django on Apache with mod_wsgi

I'm getting 500 error while trying to start Django (1.10.5) on Apache (with mod_wsgi) using postgre DB. The installation dependencies are django and. psycopg2. They are installed on a Python 3.6 virtual environment. Hint: Everything works fine, when…
Phyticist
  • 566
  • 1
  • 8
  • 20
1
vote
1 answer

"ImportError: The Python Imaging Library was not found." raised through wsgi.py in Django app using Apache

I am working on a project using Django and am trying to connect it to my Apache server. Here is the traceback for the error I am getting: mod_wsgi (pid=3325): Target WSGI script '/var/www/Project/project/wsgi.py' cannot be loaded as Python…