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.
399 questions
0 votes
0 answers
66 views
Apache server creating to wsgi app processes after a reload
I currently have a configuration for a site running on Apache in Raspberry Pi, it is for a Flask App using the apache WSGI module. The intention is to have a single process, the need for a single ...
1 vote
0 answers
118 views
Apache reload - closing connections never close, old gen slots don't die off, scoreboard fills up
We are running Rocky 9.4 with httpd 2.4.57-11 in MPM-Event, php(-fpm) 8.2 Usually, for our live webservers, when we change any config, we reload apache so there's no gap in service at all. Apache ...
1 vote
2 answers
422 views
Django app hosted in Apache running on Windows - service won't start
I've found many similar articles with similar issues, and a couple of them concluded the Apache service just cannot be run at all for my situation. However I did get the service to run -- only it ...
0 votes
2 answers
2k views
mod_wsgi on Amazon Linux 2023
I want to install Apache server module mod_wsgi on (Server version: Apache/2.4.56) Amazon Linux 2023 a Lightsail Instance. I have python3.9 and I tried with rpm it's showing error - Problem: ...
0 votes
0 answers
198 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 ...
1 vote
1 answer
790 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 ...
1 vote
1 answer
995 views
Running multiple flask applications with different domain names using mod_wsgi
We are trying to run 2 different flask applications with different domain names from same server using mod_wsgi + Apache2. This is the settings configured in httpd.conf # For www.yyy.com ...
2 votes
0 answers
109 views
Determining which Mercurial version which created a repository
I have a rather large Mercurial web server (ie. running under hgweb.wsgi) that's outgrown the distribution it was built-on... which basically means that I've already started doing upgrades of Python, ...
0 votes
1 answer
546 views
Apaches virtual host config suddenly not working anymore; how to debug?
out of the blue my virtual host config doesn't work anymore. So my setup sould be quite easy: On Port 80, I want to deliver two WSGI apps, and that's the .conf file I'm using: <VirtualHost *:80> ...
2 votes
2 answers
3k views
Why is Apache2 not finding my WSGI app?
In my previous question, I asked how to make mod_wsgi use a specific Python version. Following the answer from that question, I created a Python 3.9 virtual environment and made WSGI use it. However, ...
6 votes
1 answer
8k views
How to make mod_wsgi use Python 3.9?
I originally had Python 3.6 installed and working well with WSGI and Apache2 on my Linux server. Then I created a Flask app that had a dependency needing Python 3.7. I've successfully (and I think) ...
1 vote
0 answers
116 views
Unsuccessful flask app deployment on Amazon EC2 instance
I am trying to deploy a flask app on an Amazon EC2 instance. I have configured everything just fine but the website does not load. It remains stuck on the loading icon as follows: Website not loading ...
2 votes
0 answers
3k 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: ...
0 votes
0 answers
58 views
Coworkers think latest Django 3.1.7 needs a mod_wsgi newer than the 3.4.18 provided by Centos 7.9
My coworkers are asking me why we are using the Centos 7.9 provided apache + mod_wsgi for the sake of Django 3.1.7 VERSUS hand assembling a custom build of either Centos 7.9's apache or a custom ...
1 vote
0 answers
799 views
How to debug my config file for wsgi
I am trying to install a server for inginious (a program for automatic grading). One step in the installation is configuring Apache2 to use mod_wsgi. Here is the configuration file inginious.conf: <...
0 votes
1 answer
3k 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 ...
0 votes
1 answer
586 views
service apache2 start causes error in django
On running apache2 configtest I get Syntax error on line 2 of /etc/apache2/sites-enabled/firstweb.conf: Invalid command 'WSGIScriptAlias', perhaps misspelled or defined by a module not included in ...
0 votes
1 answer
852 views
Apache, mod-wsgi: Any URL is served by project, ServerName is ignored
I am setting up a Django project and Apache on Ubuntu 20. The below setup correctly displays the Django project, however ANY URL that points to the server's IP address is served this project. I ...
1 vote
2 answers
7k 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 ...
0 votes
1 answer
226 views
How to get to modwsgi 4+ on Centos7
On Centos7, yum pulls in mod_wsgi 3.4 using a yum install. I'm having some problems and multiple resources I have looked at regard this version as ancient and ask the users to upgrade to 4+. I'm not ...
1 vote
0 answers
2k 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 ...
0 votes
0 answers
427 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 ...
0 votes
1 answer
4k views
Are mod_wsgi, python3-mod_wsgi and libapache2-mod-wsgi-py3 the same thing? Do i need just one for Django on RHEL 7.6?
I see a couple of tutorials mentioning the Gate Interface specific to python3.6 for Ubuntu -- libapache2-mod-wsgi-py3 as opposed to just mod_wsgi in RHEL's case. Should i be worrying about looking for ...
0 votes
1 answer
549 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-...
1 vote
2 answers
5k 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 files:...
0 votes
2 answers
544 views
How to implement multiple sites using same code on a single apache server?
I have a mod_cgi code "site.py" which is used to serve a website. I'm running several instances of this website on a single apache server, each instance has its own config file. Currently my apache ...
1 vote
0 answers
394 views
Flask app to upload an image file via Apache 2 not working
Running Apache/2.4.41 on Fedora 30 and python3-mod_wsgi-4.6.4-3.fc30.x86_64. And doing a test with: mod_wsgi-express start-server /var/www/flask/upload_pictures.wsgi --user myuser works mostly fine ...
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 ...
0 votes
1 answer
3k 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 ...
0 votes
0 answers
2k 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-...
1 vote
2 answers
470 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 ...
0 votes
0 answers
416 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 /...
3 votes
1 answer
6k views
How to debug Django/WSGI/Apache errors
I have a Django 1.11.17 application deployed on Apache 2 and WSGI, Python 2.7. Apache shows an error "Truncated or oversized response headers received from daemon process" I have checked the ...
1 vote
1 answer
6k 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 ...
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 ...
0 votes
3 answers
8k 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:...
1 vote
0 answers
223 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
1 answer
57 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/...
3 votes
1 answer
4k 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
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:...
0 votes
1 answer
516 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 (...
1 vote
1 answer
9k 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
0 answers
705 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 -...
3 votes
1 answer
12k 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
0 answers
435 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
0 answers
47 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
0 answers
163 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 ...
2 votes
2 answers
10k 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
1 answer
941 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
1 answer
3k 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 #...