All Questions

Tagged with
Filter by
Sorted by
Tagged with
6 votes
1 answer
11k views

Django with Apache and mod_wsgi: no system log unless setting Debug = True

I'm using apache web server and mod_wsgi to transfer request to django. $ apache2ctl -v Server version: Apache/2.4.10 (Raspbian) Server built: Sep 17 2016 16:40:43 I'm using this apache site to ...
Thomas's user avatar
  • 61
5 votes
2 answers
2k views

504s on Elastic Beanstalk app deploy (user -> ELB -> Elastic Beanstalk mod_wsgi)

I have a Python Elastic Beanstalk load-balanced app. Here is the path a user request takes on its way into the Elastic Beanstalk app: user -> Elastic Beanstalk ELB -> Elastic Beanstalk mod_wsgi ...
markplindsay's user avatar
4 votes
1 answer
3k views

How can I make apache give the config file path and line number for a 403 error

I'm running Apache 2.4.7 on debian unstable. I'm getting 403 errors when I try to run supysonic using the mod_wsgi module. I turned the LogLevel for wsgi and authz_core up to trace6, but I'm still ...
Brian Minton's user avatar
3 votes
1 answer
33k views

apache2.4 virtual host blocking access with authz_core log, even though authz not configured

So I'm getting 403: Forbidden errors on one of my apache2.4 virtualhosts. What's interesting, is that /var/log/apache2/error.log reports: authz_core:error] [pid 4878:tid 140394394269440] [client 10....
1n5aN1aC's user avatar
  • 145
3 votes
1 answer
3k views

Apache: Truncated or oversized response headers after graceful restart

After graceful restart, some python wsgi processes fail with 500 (internal server error): [20:06:33] [mpm_prefork:notice] AH00171: Graceful restart requested, doing restart [20:06:36] [wsgi:error] ...
guettli's user avatar
  • 3,583
3 votes
1 answer
3k views

How do I install mod_wsgi in Apache for python 3.5 on CentOS 7 if apxs2 is missing?

I am currently trying to install mod_wsgi 4.4.21 into Apache 2.4 for a Python 3.5 web server on CentOS 7. Under "Configuring The Source Code" in the Quick Installation Guide, it says this: On some ...
gla3dr's user avatar
  • 151
3 votes
1 answer
2k views

Python background task thread lock error with mod_wsgi

I have a small python web application built on the Flask framework and deployed with mod_wsgi to apache. The application is scheduling a background task with apscheduler that runs every couple of ...
totokaka's user avatar
  • 202
3 votes
1 answer
292 views

Issues with URL length in Apache/mod_wsgi

I have a python wsgi API in which I process incoming URL payloads of varied length. I believe, but am not absolutely sure, that I may have run into a limitation of URL size. For a particular payload (...
horcle_buzz's user avatar
2 votes
1 answer
2k views

Why does httpd seem to use a different version of python with the same executable?

I am running Apache httpd 2.4.4 on a RedHat 5 machine. I am using Django and running through mod_wsgi. I have Python 2.4.3 installed in /usr/bin and Python 2.7.6 installed in /usr/local/bin and I want ...
Graeme Perrow's user avatar
2 votes
2 answers
11k views

mod_wsgi not working on Apache 2.4.12 64 bit on Windows 7 [closed]

I'm running Apache (Haus) 2.4.12 64 bit on Windows 7 64 bit. Python 2.7.9 64 bit is installed. Apache is running flawless if I don't try to load mod_wsgi. I downloaded mod_wsgi.so from this site. I ...
renatov's user avatar
  • 163
2 votes
1 answer
2k views

Deploying django website only for local network?

I developed a website with Django and I am deploying it with apache and mod-wsgi (as explained here). The catch is that I want to make sure that this website is accessible only on my local network. ...
a06e's user avatar
  • 373
2 votes
0 answers
2k views

Timeout when reading response headers from daemon process. Python, Flask, Apache

I have a problem with my mod_wsgi configuration. Sometimes, I think when there is a lot of traffic on my website, the page breaks and says "Resource temporarily unavailable..." Apache logs: ...
Tony's user avatar
  • 21
2 votes
1 answer
1k views

Apache2.4 + Python 3.7 + mod_wsgi not executing script

I have installed Apache 2.4 (vc15 apacheLounge) and Python 3.7. I installed the mod_wsgi using PIP and everything appears to be setup correct in the Apache server. error.log from apache: [mpm_winnt:...
luger's user avatar
  • 21
2 votes
1 answer
2k views

HTTP 503 errors with Apache and mod_wsgi

I have written a webapp in Django that I host under Apache 2.4 using mod_wsgi. At first glance, it works fine. However, when the Apache process has been running for a while, the webapp starts ...
Compizfox's user avatar
  • 384
2 votes
0 answers
581 views

Configuring mod_wsgi daemon mode processes and threads

I am planning to use mpm_worker or mpm_event with daemon mode of mod_wsgi. How to configure processes and threads of WSGIDaemonProcess directive for the optimal performance of apache 2.4.9
eldos's user avatar
  • 241
1 vote
2 answers
400 views

Too many sites on apache

I have a server with too many virtual hosts, about 500 virtual hosts, half of this with SSL. All this hosts are served with mod_wsgi for Django applications. I notice that after a certain number of ...
Gui's user avatar
  • 59
1 vote
2 answers
3k views

Running two web applications on Apache 2.4

I am trying to run two applications on my Linux apache server: OpenProject pgAdmin (which is WSGI application) And, in order to connect them from remote computer, I use those httpd configuration ...
Michał Turczyn's user avatar
1 vote
2 answers
5k views

How to enable/load mod_wsgi in apache server in centos 8 VPS

I am not able to enable/load module mod_wgsi in apache webserver in cent os 8 VPS. It works very easily in ubuntu by running the command sudo apt install libapache2-mod-wsgi-py3 Please Help me getting ...
Manav Sengupta's user avatar
1 vote
2 answers
670 views

Apache tries to access wsgi-rest parameters in DocumentRoot (AH01797)

I have the following apache2/wsgi configuration, which works fine, except that apache keeps logging: [info] Initial (No.1) HTTPS request received for child 1 (server myserver:443) [error] [client <...
x539's user avatar
  • 162
1 vote
1 answer
1k views

CentOS 7 / Apache / mod_wsgi - UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 2727: ordinal not in range(128)

I've deployed a Python web application (uses Pyramid) in Apache (httpd) using mod_wsgi. After starting the Apache service the error below (from Apache log) occurs when we make a http request to the ...
Eduardo Lucio's user avatar
1 vote
3 answers
2k views

Why is method that uses gevent in a mod_wsgi deployed Flask api raising error about switching threads?

I am trying to deploy a Flask api via Apache/mod_wsgi. The api uses Gevent to provide concurrency for a recursive method. However, it is throwing the following error [Mon Feb 08 12:05:37 2016] [error]...
horcle_buzz's user avatar
1 vote
1 answer
5k views

Import Error on deploying a flask app on apache

I am trying to deploy a flask app on a VPS using WSGI. I am not using a virtualenv, and pandas is installed on the system: Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0] on linux2 ...
daltonfury42's user avatar
1 vote
2 answers
2k views

Disable health-check logging in AWS ELB Django Application

I have a Django application running on aws-elastic-beanstalk. I try to disable the logs caused by my health-checks. The health-checks are already routed to a seperate page. Elastic-beanstalk uses ...
ohlr's user avatar
  • 61
1 vote
1 answer
7k views

Apache 2.4 with mod_wsgi: 403 Forbidden, don't have permission to access /calbase on this server

So I am trying to deploy my django project on a windows server, using apache 2.4 with mod_wsgi and pythong 3.4. Before I configure httpd.conf and just try start apache with mod-wsgi installed, it ...
lhsdaniel's user avatar
1 vote
0 answers
1k views

Apache Server Error: ImportError: No module named site

I am trying to serve my django project over Apache using mod_wsgi. Apache will start but my project in inaccessible. When Apache launches I see ImportError: No module named site in the log. There is ...
iNeedScissors61's user avatar
1 vote
0 answers
2k views

Error Deploying Django web using mod_wsgi (Forbidden: You don't have permission to access / on this server.)

Hello I'm trying to deploy my first Django website using Apache inside of Centos7 Versions: Apache: 2.4.6 Django: 2.2.6 Python: 3.6.8 My Django project is located inside the /srv directory and ...
Alvaro Bataller's user avatar
1 vote
0 answers
193 views

How to run more than one django sites using same virtual environment as subdirectories in apache?

I have an unmanged vps. I have 3 django sites sitename_dev, sitename_staging, sitename_live which are run using a virtual env. All 3 are default django instances with no changes made. I have ...
Tuhin's user avatar
  • 11
1 vote
2 answers
891 views

Intermittent slow response & timeouts - Apache + mod_wsgi + Web2py

I've Ubuntu 14.04.5 LTS (i686) on a Digital Ocean droplet with 2x2.4GHzCPU & 4gb physical memory. I am running a web2py application on it with Apache and mod_wsgi. There are a few additional ...
user2436428's user avatar
1 vote
0 answers
408 views

Apache ignores WSGIScriptAlias if same directory exists in root

I notice a peculiar error when serving Django app through mod_wsgi. In my document root, I have /admin directory that is restricted to 127.0.0.1 using LocationMatch directive. I also have /admin ...
Red's user avatar
  • 133
1 vote
1 answer
826 views

Apache with mod_wsgi - how to reject requests if all threads are busy?

We have a server that is running Apache and one of the vhosts is using mod_wsgi to run a heavy task on request. The server can handle X requests at a time and each of them will run for ~10 minutes. ...
Niko's user avatar
  • 61
1 vote
1 answer
2k views

Django 1.10.3 Apache wsgi - ImportError: cannot import name signals

Overnight django stopped working, possibly because of an automatic package upgrade on the server. Its wsgi script now fails to load in production, but running the development server works fine. What ...
frankster's user avatar
  • 121
1 vote
0 answers
2k views

Django Site with httpd and mod_wsgi: 403 Forbidden

I've spent the whole day trying to find an answer to my issue, yet I failed and decided to post my problem here instead. So I have develop a Django Application and now I'm having problems in deploying ...
Dudu's user avatar
  • 11
1 vote
0 answers
71 views

urllib3 failure through Apache/WSGI; successful from python commandline

I have a webserver serving Django through Apache 2.4 with mod_wsgi and Python 2.7 on Ubuntu 14.04. When first setup, outgoing connections from this webserver using the Python library urllib3 were ...
garromark's user avatar
  • 920
1 vote
0 answers
158 views

Unable to diagnose downtime / memory issues with Apache and mod_wsgi

I have an Ubuntu EC2 instance (t1.micro, 600mb of RAM) running mod_wsgi on Apache, to serve a Django app. This is all behind a load balancer. The problem I keep running into is that I can only seem ...
kayeight's user avatar
1 vote
1 answer
2k views

Django, mod_wsgi, pyvenv-3.4 - configuration

I'm trying to deploy my first, simple django website. I have an VPS with Ubuntu 14.07 Server, Apache 2.4.7 with mod_wsgi. So, i added this vhost: <VirtualHost *:80> ServerName api.XXX.net ...
brylcio16's user avatar
1 vote
0 answers
2k views

Apache periodically shutting down once per week

I'm using apache (with mod_wsgi and django), and everything works fine, except rather strangely once per week apache seems to shutdown, and I have to login to the server to restart it to get my sites ...
fpghost's user avatar
  • 673
1 vote
1 answer
572 views

Why does Apache with mod_wsgi force a download of .py files instad of executing them?

Why does Apache with mod_wsgi force a download of .py files instead of executing them? I'm trying to run Django, but the first issue I have is .py files not executing. I'm following the docs here ...
BlueDogRanch's user avatar
0 votes
1 answer
10k views

Cannot run mod_wsgi on Apache 2.4 x64 Windows

I have a Apache 2.2 installation with a site on Django. I load mod_wsgi.so module in my Apache config. Now I'm trying to migrate onto Apache 2.4 and have difficulties with WSGI. First of all: my ...
Shrike's user avatar
  • 195
0 votes
3 answers
7k views

Apache/httpd error: Invalid command 'WSGIPythonHome'

ISSUE: My Apache/httpd server will not launch. journalctl -xe reveals: Feb 27 01:50:12 localhost.localdomain httpd[4398]: AH00526: Syntax error on line 355 of /etc/httpd/conf/httpd.conf: Feb 27 01:...
Josh's user avatar
  • 131
0 votes
1 answer
2k views

mod-wsgi one daemon for multiple VirtualHosts with different ServerNames

I have an apache2 / mod-wsgi deploy serving multiple domains with what is essentially one single application. All domains are served both on port 80 and 443. So, my configuration would look ...
velis's user avatar
  • 233
0 votes
1 answer
2k views

AH00035: access to / denied 403 Forbidden Django mod-wsgi

I am trying to configure apache with Django using mod-wsgi. But I am getting the following error AH00035: access to / denied (filesystem path '/home/ec2-user/ezvoice') because search permissions are ...
Talha Anwar's user avatar
0 votes
1 answer
2k views

Python module import from a WSGI script fails on RedHat server

Here is a minimal WSGI script, importing a custom python module. It runs fine on a development environment (Mint 18.1, Apache 2.4.18, libapache2-mod-wsgi-py3), but fails when deployed to a test ...
rclyde's user avatar
  • 11
0 votes
1 answer
2k views

Centos7 mod_wsgi python3 django timeout error 504 Gateway error

I have been using apache for a django project. I need to upload a very large file in application. But I am getting Gateway timeout error 504. I am using Centos7, httpd2.4, mos_wsgi, python3.48 #...
Abdullah Sifat's user avatar
0 votes
1 answer
2k views

Serving a Python Page with Windows / Apache / Mod_WSGI?

I'm trying to setup python / apache / WSGI on windows. I have the following installed, all 32-bit and vc9: Apache 2.4 Python 2.7.9 Mod_WSGI.so in the modules folder. http://localhost/ Displays the ...
some1's user avatar
  • 79
0 votes
1 answer
1k views

mod_wsgi keeps using system python

I installed apache 2.4 on ubuntu 14.04 with mod_wsgi 4.4 from source and pyenv to use python 2.7.9. I set up the apache configuration to work with pyenv. I'm getting the following error when I run ...
Omiga's user avatar
  • 111
0 votes
0 answers
112 views

Apache24 on windows returns 'It works' only instead of the virtual hosts

I have configured Apache 24 with mod_wsgi on windows 2016 server for my Django applications and deployed three websites with different IP addresses. I have also configured ssl certificates for each ...
Wogayehu's user avatar
0 votes
0 answers
290 views

How to correctly tune Apache and mod_wsgi

I'm using Django with mod_wsgi and need to tune the httpd.conf to handle 500 requests per second at peak. Right now I have the following configuration: StartServers 3 ServerLimit 15 MinSpareThreads ...
Paul R's user avatar
  • 171
0 votes
1 answer
384 views

Need .py files to execute in the same directory with .html and .php files using mod_wsgi

I'm running CentOS 8.1 with Python 3.6.8, and Apache/2.4.37. I'm new to mod_wsgi. I found this "hello world" example and got it to work: https://www.ionos.com/community/hosting/python/use-mod-wsgi-...
Edward_178118's user avatar
0 votes
0 answers
1k views

Apache child process does not exit and is not terminated

I am running a web application with Debian 9, Apache 2.4, mod_wsgi 4.5, django 1.11 and python 2.7. My apache conf is ServerTokens Prod ServerSignature Off FileETag MTime Size Header set X-Frame-...
Yotam Alon's user avatar
0 votes
0 answers
337 views

mod_wsgi LoadModule for Python3 is ignored

Trying to configure apache with mod_wsgi and Python3 mod_wsgi config LoadModule wsgi_module /etc/httpd/mod_wsgi/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so Flask App config WSGIScriptAlias /...
Karthi's user avatar
  • 1