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

How to get mod_wsgi-express from pip using Dockerfile

I can't recall how I installed mod_wsgi-express, but I'm almost certain that I used pip. I've got this line in my requirements.txt file: mod_wsgi-express==4.5.15 Collecting mod_wsgi-express==4.5.15 (from -r /usr/src/app/requirements.txt (line 16)) …
JacobIRR
  • 8,545
  • 8
  • 39
  • 68
1
vote
0 answers

Deploying Python Flask API on Apache on Windows 7

I am trying to deploy my Python Flask API using Apache on Windows 7. I found that since Python is not a native development language it needs WSGI (Web Service Gateway Interface) to connect to Apache. I also found some tutorials on that but none of…
Benz
  • 289
  • 4
  • 15
1
vote
1 answer

Why `sys.path` differs when executed in mod_wsgi and normal interpreter mode?

Environment: MAC OS 10.10.4 python 2.7.12 with pyenv mod_wsgi 3.4 Apache/2.4.10 (Unix) I have a wsgi.py that print the sys.path: import sys print sys.path sys.path.insert(0, '...') from app import app as application and I confirmed that during…
Lucas Yang
  • 63
  • 8
1
vote
0 answers

How to set Apache mod_wsgi with php in httpd-vhosts.conf?

I want to set mod_wsgi with php in httpd-vhosts.conf using same domain and port(443). Below is httpd-vhosts.conf settings: ServerName ctest.lock.com:443 DocumentRoot "/home/service/card" Alias /card…
ash84
  • 787
  • 3
  • 12
  • 33
1
vote
1 answer

session issue with django+apache+mod_wsgi

I've written a django application, and put it on a CentOS server. It is definitely okay when I use django development web server. Such as I start it by "python ./manage.py runserver", and access that server from browser on another computer. I can…
William
  • 239
  • 1
  • 2
  • 11
1
vote
0 answers

Unable to Load the WSGI Script from Apache

I have some troubles with the WSGI script and Apache. CKAN runs on Centos 7 in a virtualenv. Nginx proxies the requests to apache who listens on port 8080. Unfortunately, apache is not able to execute the WSGI script. apache.wsgi import…
Reto Zeder
  • 11
  • 3
1
vote
1 answer

How to know it is an ajax request in a WSGI script?

I write this little WSGI script : def application(environ, start_response): data = '\n'.join(sorted(['%s = %s' % i for i in environ.items()])) print data start_response("200 OK", [ ("Content-Type", "text/plain"), …
Eric
  • 4,821
  • 6
  • 33
  • 60
1
vote
1 answer

Django and mod_wsgi python versions?

Can Django run on Python 3.6.x while mod_wsgi is create using Python 2.7.x? thank you very much for the help.
djangoman
  • 319
  • 4
  • 11
1
vote
2 answers

Declare Django settings to use with mod_wsgi/apache

I have multiple settings files in my Django project (base.py, local.py, production.py). Locally, I'm kicking off the Django dev server via python manage.py runserver --settings=config.settings.local How can I tell mod_wsgi to use the same file?…
brewcrazy
  • 623
  • 13
  • 30
1
vote
0 answers

'Target WSGI script cannot be loaded as Python module' in error log

I wrote a simple hello.py as API and would like to use it through port 8081, but encountering the problem: Target WSGI script '/var/www/wsgi/hello.wsgi' cannot be loaded as Python module. on Ubuntu16.04, it is a fresh install. Only apache2, flask,…
adayoegi
  • 117
  • 10
1
vote
2 answers

Apache fails to start as Windows service with mod_wsgi

I'm using Apache 2.4, Python 3.5 and appropriate mod_wsgi from Gohlike binaries page, everything is 64-bit. Apache works as intended when it's started manually, but when I'm trying to start it as service it fails and produces httpd.exe: Syntax…
1
vote
0 answers

Running background thread on OpenShift Online

I am trying to adapt a custom socketserver.TCPServer which uses a handler inheriting from http.server.SimpleHTTPRequestHandler to run on OpenShift Online. The original code runs a non-halting background thread which crunches data from third party…
Mirac7
  • 1,566
  • 4
  • 26
  • 44
1
vote
1 answer

Django: Restrict static folder access to non logged-in users

I am trying to restrict those users, who directly hit on a absolute static image url path(www.xyz.com/static/img/sam.png) in browser and access it. I tried with the following django…
Abijith Mg
  • 2,647
  • 21
  • 35
1
vote
1 answer

Django: WSGI delays

I've deployed a django-application, which basically works fine. The only problem I have is that there are sometimes requests hanging, and I can't find the reason for this. "Hanging" means, e.g. if I click on a link in the admin backend, the browser…
schneck
  • 10,556
  • 11
  • 49
  • 74
1
vote
1 answer

Django TemplateDoesNotExist in production server when it works in development

I get the following error. It's ONLY IN PRODUCTION where I deploy Django application using apache + mod_wsgi. IT WORKS PERFECTLY IN DEVELOPMENT server(my computer): TemplateDoesNotExist at / base.html postmortem. as you can see only one of my two…
Marijus
  • 4,195
  • 15
  • 52
  • 87