Questions tagged [mod-wsgi]
The mod_wsgi module is a python WSGI adapter module for Apache.
3,178
questions
-1
votes
0
answers
12
views
Can't browse Flask app on AWS apache2 using mod_wsgi
I am trying to deploy the Flask app on AWS EC2 using mod_wsgi, but can't browse the application and there are no errors in the log file. Here is what I have done:
Files of the server:
The content of ...
0
votes
0
answers
10
views
Django project located out of Apache ServerRoot
Got some problems trying to include Django-app in my already configured httpd2 apache server.
I'd successfully installed mod_wsgi and set some configuration using the deployment manual:
https://docs....
0
votes
1
answer
30
views
Syntax Error when deploying django on apache2
I am trying to host a django application on a server using apache2 and mod_wsgi.
The project itself is located at the path /usr/share/django-projects/mysite
The virtual environment is located at the ...
0
votes
0
answers
48
views
Deploying django with apache + mod-wsgi _ Error 500
I'm trying to deploy my first django app in windows 10 (x64), so installed apache 2.4(x86), installed and build mod_wsgi (4.9.1) with python 3.8(x86) (I have microsoft visual studio 2019 installed) ...
-1
votes
0
answers
13
views
Apache24 on windows returns 'It works' only instead of the virtual hosts [closed]
I have configured Apache 24 with mod_wsgi on windows 10 server for my Django applications and deployed three websites with different IP addresses. I have also configured ssl certificates for each ...
0
votes
0
answers
13
views
Run Django Website with different mod_wsgi than default
I have an Apache2 server hosting multiple Django websites. All except one use Django 3.8, using a mod_wsgi compiled on Python 3.7. The outlier (let's call it SiteX) uses Django 4.0, which requires ...
0
votes
0
answers
18
views
How to use Python thread with Flask in Apache
I'm trying to deploy my Flask app to Apache webserver.
In my main file, before running the Flask app, I start a daemon thread that runs in background:
# ... here there are all the imports and the ...
0
votes
0
answers
15
views
Debugging "Segmentation fault (core dumped)" for Flask App deployed on Apache with mod-wsgi-py3 (Ubuntu)
I created a Flask app that uses Beautiful Soup and Selenium to scrape and track Amazon product prices. The data was stored using CS50's version of SQLalchemy.
I then created an account to use Oracle's ...
0
votes
0
answers
77
views
Django from django.core.wsgi import get_wsgi_application , No module named Django
ve been struggling with deploying my Django app, when i do it with 0.0.0.0:8000 everything works fine but as soon as i am using apache then i get Django from django.core.wsgi import ...
0
votes
1
answer
29
views
Uploading files show permission denied (CentOS7 + Apache + mod_wsgi + django)
I deployed a beta version of my django app to DigitalOcean and I am serving it using Apache and WSGI.
Everything works well include static files and 'get' media files(I saved it directly to DB), ...
0
votes
1
answer
39
views
Why is my Python path configuration not changing in Apache
I am trying to setup Apache 2.4 on Windows to work with a Django project. As a first try, I made just a base application showing the "welcome-rocket" of Django.
After configuring the httpd....
0
votes
1
answer
28
views
mod_wsgi with python 3.9
I tried to install mod_wsgi with python3.9 and I encountered the following problem:
Collecting mod_wsgi
Using cached mod_wsgi-4.9.0.tar.gz (497 kB)
Preparing metadata (setup.py) ... error
error: ...
1
vote
1
answer
47
views
mod_wsgi not using venv
I am trying to setup a Django project using Apache with mod_wsgi.
I have set wsgi like this:
WSGIDaemonProcess Breath python-home=/var/www/vhosts/Breath/env/
WSGIProcessGroup Breath
WSGIScriptAlias / /...
0
votes
1
answer
41
views
How to structure apache virtual host and wsgi file for Flask application with python 3.10 on raspbian
On a raspberry pi 3 I am trying to deploy a Flask application on apache server. This application is going to be accessible by a custom internal network domain called darts.loc.
The structure of the ...
0
votes
0
answers
22
views
django not functioning over HTTPS with apache and mod_wsgi
My requirement is to take my django app over HTTPS.
I generated ssl certs with the help of command:
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout ssl_cert.key -out ssl_cert.crt
...
0
votes
0
answers
41
views
Apache LocationMatch: how to match again after internal redirect
I have a apache LocationMatch with two sets of RewriteCond and RewriteRule. If the second set hits I want to start the LoactionMatch over again.
In my apache2 ( Apache/2.4.41 (Ubuntu) mod_wsgi/4.9.0 ...
0
votes
1
answer
40
views
Django - Serving production using Apache2
Days I struggle with this.
I have a django webapp written in Python 3.10 that works fine when launched using pipenv shell then python3.10 manage.py runserver. Also, doing python3.10 app/wsgi.py quits ...
0
votes
1
answer
25
views
Apache: LoadModule mod_wsgi-4.9.0 giving error
I have installed mod_wsgi-4.9.0. On checking
ldd /usr/lib64/httpd/modules/mod_wsgi.so
was giving error:
linux-vdso.so.1 => (0x00007ffeb0967000)
libpython3.9.so.1.0 => not found
...
0
votes
1
answer
40
views
Taking django application to https
I have a django application running perfectly fine in development server with http://localhost:8081
I need to take it to https. For which I tried 2 methods, but none of them is working.
Method1: Using ...
0
votes
0
answers
32
views
Apache/mod_wsgi log object issues upon importing some module
I have a Django application that runs on an Apache server, Ubuntu OS.
I've recently added a new import statement of some module, that causes the following server error:
File "/dataco_monitor/...
-1
votes
2
answers
48
views
mod_wsgi can't import flask with pipenv
I'm trying to deploy my first flask application and I'm running into some issues. I had my app working on my local machine with the build in flask development server, and all my dependencies were ...
0
votes
0
answers
31
views
httpd mod_wsgi docker logs
I have a python application that's running with the mod_wsgi module in httpd version 2.4.6 (CentOS). The application is then behind a firewall that is configured to insert X-Forwarded-For. In the ...
0
votes
0
answers
125
views
Trouble solving "No module named 'encodings'" issue with mod_wsgi
EDIT: I solved it and will update soon. Seems to have helped to compile mod_wsgi from source, and there were other things that also helped.
First of all, I realize that this is a common problem but I ...
0
votes
1
answer
22
views
Running multiple django apps in apache https server one in / and another in /app2
I am trying to deploy two django apps in same server ssl port 443. While I comment following three lines in first block app2 is running while commenting in second block app1 is running and when ...
0
votes
2
answers
63
views
Deploy Flask API on Apache, with mod_wsgi
I've followed several tutorials at this point and know this has to be some minor issue. PLEASE help me find it!
I have a Flask API, using Flask-Restx, ready to go and a remote Debian VPS with Apache. ...
0
votes
1
answer
8
views
Issue with import pandas error using mod_wsgi
I devlopped a flask app in which I use pandas.
When I start the python environment using
Source myenv/bin/activate
And run.py
=> everything is ok and the app run normally
But when I try to deploy ...
-1
votes
1
answer
24
views
csv reader opening files differently in Django and Apache
I need to parse a csv file inside my Django application. The csv file could have some non-ascii characters that I need to remove before processing. Here's what my code looks like
with open(...
0
votes
0
answers
32
views
Too many apache threads in mod_wsgi
Below is the config I am using and is in port 80 and port 443 virtual host config. I observed that for the port 80 daemon process, threads are as expected which are 56 in total for 8 process, however ...
0
votes
1
answer
24
views
Is there a way to pass options values during mod_wsgi server start up in Django app
I am using mod_wsgi to run my Django app. As there are a plethora of options to define when the server run command is fired, I was trying to create some kind of python script to pass the options and ...
0
votes
2
answers
49
views
Host a Django project on Apache2 locally
I have finished a Django project and want to deploy it over Apache2 locally over LAN. I have figured out how to connect Django with Apache2 using mod_wsgi and it worked great because I was able to use ...
0
votes
0
answers
120
views
Installing mod_wsgi with pip install causes an error [duplicate]
I am trying to install mod_wsgi so I can run my Django app with Apache.
However when I use pip install mod_wsgi I get the following error:
ERROR: Command errored out with exit status 1:
...
1
vote
0
answers
41
views
mod_wsgi-express causing ModuleNotFoundError: No module named "mod_wsgi.server"
I'm trying to deploy the Django 3.2 project with Python 3.10 on CentOS 7 but I am facing issues in it.
I'm trying to run the following command to run mod_wsgi-express:
mod_wsgi-express start-server ...
0
votes
1
answer
561
views
wsgi: ModuleNotFoundError: No module named 'django' error
I am trying to host my Django app on my Ubuntu server and when trying to access my website, I get this error from the Apache log:
ModuleNotFoundError: No module named 'django'
I am using a venv for ...
0
votes
1
answer
210
views
Target WSGI script cannot be loaded as a python module
I have been trying to get my django app deployed for a while now and no matter what I have followed and tried I keep running into errors.
I am currently getting this error:
Target WSGI script '/home/...
0
votes
0
answers
50
views
How To solve "Error C1083" when Install mod_wsgi in windows? file 'ws2tcpip.h'
I try to install mod_wsgi for windows I install the diferentes requirements about C and C++, and this other stuff, about Visual Studio etc..
But I got this error:
ERROR: Command errored out with ...
0
votes
2
answers
222
views
Configuring mod_wsgi for python3 on Redhat 7
I am trying to configure an Apache Server to host my Flask API's using WSGI and Apache.
I have installed Apache 2.4.6 on Redhat 7, but the default python version for mod_wsgi is python 2.7 .
I have ...
0
votes
2
answers
137
views
Django wsgi.py can't initialize the settings module: "ModuleNotFoundError: No module named 'config'"
My Django dev environment runs fine with the native server, but when I try to execute wsgi.py, either locally or on the production server, I get the extremely popular ModuleNotFoundError: No module ...
0
votes
1
answer
72
views
Why am I getting a syntax error on the first line of this code?
I cannot understand what the syntax error is.
application(environ,start_response):
status = '200 OK'
html = '<html>\n' \
'<body>\n' \
' Hooray, mod_wsgi is ...
0
votes
0
answers
24
views
Is it safe to concatenate paths in a uWSGI python script?
I've an Nginx server, which proxies .ini file requests to a uwsgi:
location ~ .ini$ {
include /etc/nginx/uwsgi_params;
uwsgi_pass 127.0.0.1:8001;
}
uwsgi proxies requests to ...
0
votes
2
answers
699
views
apache wsgi_mod fails to run on python 3.10
I am developing a django app using django 4 and python 3.10.
I had a server using apache and mod_wsgi, that used to run an old app using python3.8.
I've created a virtual env from 3.10. Command line ...
1
vote
0
answers
134
views
Module wsgi error when deploying Django app on apache
I had developped an application using Django (DRF). And I try to deploy it on a server. After following some tutorials on Internet, I got this error :
mod_wsgi (pid=27182): Failed to exec Python ...
0
votes
0
answers
13
views
Setting Custom Log Ownership with mod_wsgi-express
Is there a way to set the group:user ownership of custom logs such as error, startup and access when using mod_wsgi-express start-server?
Currently, all custom logs are being given root permissions (...
-1
votes
1
answer
120
views
AttributeError: /usr/sbin/httpd: undefined symbol: Error_GetLastErrorNum with Flask and mod_wsgi
I have a website that runs python code with Flask and mod_wsgi. I set the WSGIDaemonProcess user and group and the WSGIProcessGroup. Recently, after updating geopandas, I have been getting the error ...
0
votes
1
answer
64
views
Mod_wsgi daemon mode not reloading web page templates
I cannot reload django templates by touching the wsgi.py script located in my django application root/application name.
The script and project are located under /var/www, so I need sudo to execute ...
0
votes
1
answer
50
views
XAMPP with WSGI not rendering django page
I am trying to run django on XAMPP Apache server and followed the steps mentioned here. Here are the changes in Apache config:[![enter image description here][1]][1]
When access the application in ...
0
votes
0
answers
110
views
mod_wsgi 4.8.0 Error in Installation With Python 3.9.6 and Apache 2.2.15
I'm trying to install mod_wsgi 4.8.0 with apache 2.2.15 and python 3.9.6.
I need mod_wsgi to host django application but am unable to install mod_wsgi.
Note: I have installed httpd-2.2.15 and httpd-...
0
votes
0
answers
15
views
I'm trying host Django prj with xampp
I have set up all the necessary steps such as installing mod_wsgi (including copying to apache's modules folder), c++ tool build, but when I run xampp, it fails.1
and what's keeping it from running is ...
0
votes
0
answers
35
views
AH00364 - Apache24 wont start service
i'm doing a project for college. were building a website and after restarting my amazon EC2 instance apache wont longer start.
this is from the httpdconfig file for apache
#
Define SRVROOT "/...
0
votes
0
answers
22
views
How should the code be organized in Python for WSGI around the 'application'?
Using this example from https://www.server-world.info/en/note?os=CentOS_8&p=httpd&f=10
[root@www ~]# vi /var/www/html/test_wsgi.py
# create new
def application(environ, start_response):
...
1
vote
0
answers
101
views
Apache + mod_wsgi + Django + dataclasses stopped working after upgrade to python3.10
After upgrading to python3.10 code with dataclasses stopped working with mod_wsgi.
If a class is created with @dataclass decorator (with just a single attribute x: str) and then instantiated somewhere ...