Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [mod-wsgi]

mod_wsgi is an easy to use Apache module that can host Python web applications which support the Python WSGI interface.

1
vote
0answers
27 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 ...
0
votes
1answer
13 views

How to activate the API in Pootle 2.8.2

I'm wondering does the Pootle API work the same in version 2.8.2 as in version 2.5.1? I don't see any updated docs for the API in Pootle 2.8.2, the last I see is https://pootle.readthedocs.io/en/...
2
votes
1answer
114 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] ...
2
votes
0answers
156 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:...
0
votes
1answer
23 views

How to allow a Django application running on Apache to access a remote directory mounted with sshfs

I have a Django application that access a remote directory mounted with sshfs to upload files. The Django application has to read those files as well. The setup is running fine with the Django server (...
0
votes
1answer
416 views

Django 2.1 deployment on centos 7 with apache, mod_wsgi, python3 venv

I've stumbled with this seemingly most relevant deployment option because guides seem to either reference mod_wsgi with python2, or deployment on deb based systems where expected paths are different. ...
0
votes
0answers
60 views

Django app not running on apache 2.4 with mod_wsgi daemon

I need help in understanding if I have correctly upgraded my website's older config from httpd-2.2 to httpd-2.4. It was hosted on a local server that we have since retired and the entire /etc/httpd ...
0
votes
0answers
48 views

Cannot use mod_wsgi-express to serve a site on https

I have a django site. I downloaded letsencrypt certificates for mysite.com and tried to run mod_wsgi-express like this: mod_wsgi-express start-server --log-to-terminal --startup-log --https-port 443 -...
0
votes
1answer
414 views

Wsgi not finding python modules

Trying to get Django server running with Apache and WSGI This is my wsgi.py import os from django.core.wsgi import get_wsgi_application sys.path.append('/home/rohan/Desktop/narsil/narsil') # ...
1
vote
0answers
217 views

Getting Mod_WSGI Error: Deploying Flask Application to ElasticBeanstlk

I am current trying to deploy a Flask Application (an API Application) onto Elastic Beanstalk. But I am getting mod_wsgi error. Here is the error message: [Fri Jun 01 06:10:49.314023 2018] [:...
0
votes
0answers
96 views

WSGI Process looking for site-packages at wrong location with AWS EB with load balancer

I did everything as mentioned by Andrew in his answer here. the error of site.addsitedir() has gone. but then I started getting error of "populate() isn't a reentrant." which is caused by wrong site-...
0
votes
0answers
29 views

Is it all right to see thousands of “Python has shoutdown” in apache log?

As we can see in the picture, thounds of initial&delete info appeared in logs. I don't know what a good Django web site should be, but keep fork&delete seems abnormal and waste resources.
1
vote
0answers
64 views

Apachi httpd hangs on linux servers

In the last few months we're experiencing a major issue in our production php servers: The httpd running on our linux servers hangs and not responding to new requests (up to request timeout) until we ...
0
votes
0answers
255 views

apache mod_wsgi failure on apache reload (logrotate)

We have an application that has been running for a few weeks, now. Today, for the first time, it is returning a lot of 503 errors. A few requests succed, but most get a 503. It is a Flask application ...
0
votes
0answers
111 views

Use suexec for mod_wsgi WSGIAuthUserScript directive

Here's my apache conf file for the site (editing out the PHP-FPM parts of it): <VirtualHost *:80> AddDefaultCharset utf-8 ServerAdmin ADMIN@DOMAIN.HERE ServerName localhost ...
1
vote
2answers
1k views

Error when trying install mod_wsgi using pip

When trying to install mod_wsgi using pip as follows: pip install mod_wsgi I get the following error: 4m.so -L/usr/local/lib -L/usr/local/lib/python3.4/config-3.4m -lpython3.4m /bin/ld: /...
0
votes
1answer
194 views

Django site running in Apache 2.4.6 on Centos giving 503 server error

Please assist. I have a Django site that i'm trying to configure to run in apache using mod_wsgi. I have setup my virtualhost as follows: <virtualhost *:80> ServerName mysite.com ...
0
votes
0answers
64 views

Receiving syntax error when trying to activate mod_wsgi-express

The server is running CentOS 6.9, Apache 2.xx.x and I am attempting to deploy a Python Django site with mod_wsgi. I thought everything was good, and when I run mod_wsgi-express start-server wsgi.py --...
0
votes
1answer
302 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 #...
0
votes
0answers
192 views

Configure two sites of django 1.11 + wsgi 3.4 with Centos 7 and Apache 2.4.6 (httpd)

Now, I have two sites under /var/www/html/, one is elastic, another named tcpdump. They are both Django projects and with WSGI, they can work with Apache server individually. I want to serve these ...
0
votes
1answer
528 views

Apache mod_wsgi tuning

I have a django site on webfaction that uses apache + mod_wsgi. Site is getting around 1000 requests per minute. But it makes some calculations, so request takes about 5-10 seconds. I use the ...
6
votes
1answer
3k views

mod_wsgi “Call to 'site.addsitedir()' failed” on AWS Elastic Beanstalk Python 3.6 platform

On AWS Elastic Beanstalk, on the "64bit Amazon Linux 2017.09 v2.6.0 running Python 3.6" platform, there seems to be a problem with the mod_wsgi configuration. I see this in /etc/httpd/conf.d/wsgi.conf:...
1
vote
1answer
426 views

Change apache MPM prefork to worker on Amazon Linux AMI

My project by default is running under Prefork MPM. Rigth now i am having some slowing issues, my web got timeout error. Searching on differents foroums i see that is recomended to use the worker ...
1
vote
2answers
182 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 ...
5
votes
1answer
3k 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 ...
1
vote
1answer
3k views

Reason for “Gateway Timeout” (mod_wsgi)

I get "Gateway Timeout" 504: The gateway did not receive a timely response from the upstream server or application. I use apache with mod_wsgi Version 4.4.8. In the apache error log I see: ...
0
votes
1answer
487 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 ...
0
votes
0answers
51 views

trac git repository browser not working

I am trying to setup Trac 1.0.13 on Apache with mod_wsgi. I want to be able to browse local git repos with the BrowserModule. My trac.ini has [git] cached_repository = enabled persistent_cache = ...
1
vote
0answers
436 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 ...
1
vote
1answer
362 views

Mime Magic on files without extension on Apache/2.2.31 and mod_wsgi 3.4

Sorry in advance for the length, thanks for your patience. I have an ancient production server that no one knows how it was built. It uses apache+mod_wsgi to run a Cherry Py python application to ...
4
votes
5answers
5k views

WSGI : Truncated or oversized response headers received from daemon process

System Configuration : Apache2, Django 1.10, Python 3, Ubuntu 16.04 LTS Django debug=True. /var/log/apache2/error.log [52:53.057967] [wsgi:error] [pid 4303] [client 1.1.1.22:24409] Timeout when ...
0
votes
1answer
30 views

Bigger file uploads from Chrome browser hang the mod_wsgi

Recently we upgraded mod_wsgi to v 4.5.15. When trying to upload a 700KB or bigger file to a Django project from Chrome, the Django website crashes. The same file upload from Firefox works fluently. ...
0
votes
1answer
2k views

Apache mod_wsgi, Django and project file permissions

I am setting up a Django project in production. But I'm dealing with a weird permission issue. Before all, this is the structure of my project: project project settings.py urls.py wsgi.py ... apps ...
0
votes
0answers
1k views

SSL configuration to prevent HTTP Host header attacks

I have several Django websites set up with Apache and mod_wsgi on one server. Some of the websites use SSL certificates from letsencrypt (I'll call the websites A, B, C). Some other websites don't use ...
1
vote
0answers
126 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 ...
0
votes
1answer
363 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 ...
0
votes
0answers
90 views

Large number of apache virtualhosts: Python mod_wsgi vs PHP

I have a large number of low-traffic sites I'd like to host on the same Apache server, as many as 500 sites. Currently, I'm powering the pages with PHP and I have a different virtualhost set up for ...
1
vote
1answer
306 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. ...
0
votes
0answers
2k views

Apache2 mod_wsgi Error Timeout when reading response headers from daemon process

I have to work with the web service that has created with using uwsgi django .Apache2 works as a web server.When the web service got request most of time get the response.But if the service does not ...
1
vote
0answers
68 views

Which is Best way to serve multiple wsgi apps using apache2 with different python versions?

Right now I've got a python2 django app deployed in my sever using apache2 and mod-wsgi. Now I want to deploy another one, but this is written in python3. My problem is that mod-wsgi is compiled to ...
0
votes
1answer
945 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 ...
0
votes
0answers
694 views

Django-cms mod_wsgi Compiled vs runtime python version

I am an apache novice... that being said. I'm trying to run through a tutorial for configuring django-cms. Everything works well enough when I'm using manage.py 's runserver, but now I want to run ...
0
votes
0answers
82 views

Apache/mod_wsgi process dies unexpectedly

I'm testing the limit of my Python Flask web application running on an Apache web server by making a request that takes over 30minutes to complete. The request requires thousands of database requests (...
0
votes
1answer
3k 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 ...
1
vote
1answer
2k views

Compiling mod-wsgi - How to install python3-devel on centos-6.8

I'm trying to deploy Django-1.10 on Centos-6.8 using default apache in centos(version 2.2). I'm using python 3.4.5.I'm not able to compile mod-wsgi without python3-devel. Centos-6.8 repos doesn't have ...
0
votes
1answer
349 views

Deploying django on mod_wsgi

The problem: I get 404 error when trying to reach localhost:80. [root@alarmpi public_html]# tail -n 1 /var/log/httpd/error_log [Sat Jun 04 23:09:50.235251 2016] [wsgi:error] [pid 2323:tid 1973417008]...
-1
votes
1answer
3k views

trouble deploying django under apache on centos with mod_wsgi

EDIT 2: I got this running mostly! It was indeed a SELinux issue. So most things work, I get a cannot write to a read only database error. And some of my things that seem like static are not found,...
1
vote
1answer
80 views

Serving Flask + Apache + WSGI Behind Sonicwall

Strange problem here. I've gone through this tutorial on setting up a deployment environment for a Flask app. When I navigate to the servers local IP address it is serving everything fine. However ...
0
votes
1answer
1k views

mod_wsgi app in two different ports

I have a WSGI app working in prod and I want a staging app in the same server, So I configured two virtual hosts in different ports, 80 for prod and 9090 for stag, but every time I request port 9090 ...
0
votes
1answer
462 views

Flask with python 3.5

I'm trying to run a flask app on my aws ec2 instance. I've installed anaconda with python 3.5. In order to install mod-wsgi I run the following command: sudo yum install libapache2-mod-wsgi python-...