Questions tagged [mod-wsgi]
The mod_wsgi module is a python WSGI adapter module for Apache.
3,173
questions
0votes
0answers
8views
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
...
1vote
1answer
23views
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 ...
0votes
0answers
16views
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/...
-1votes
2answers
31views
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 ...
0votes
0answers
14views
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 ...
0votes
0answers
54views
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 ...
0votes
1answer
17views
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 ...
0votes
2answers
45views
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. ...
0votes
1answer
6views
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 ...
-1votes
1answer
18views
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(...
0votes
0answers
20views
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 ...
0votes
1answer
14views
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 ...
0votes
2answers
36views
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 ...
0votes
0answers
40views
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:
...
1vote
0answers
24views
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 ...
0votes
1answer
247views
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 ...
0votes
1answer
87views
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/...
0votes
0answers
34views
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 ...
0votes
2answers
106views
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 ...
0votes
2answers
68views
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 ...
0votes
1answer
33views
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 ...
0votes
0answers
21views
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 ...
0votes
2answers
375views
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 ...
1vote
0answers
83views
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 ...
0votes
0answers
12views
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 (...
-1votes
1answer
69views
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 ...
0votes
1answer
50views
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 ...
0votes
1answer
35views
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 ...
0votes
0answers
46views
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-...
0votes
0answers
14views
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 ...
0votes
0answers
27views
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 "/...
0votes
0answers
19views
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):
...
0votes
0answers
46views
Requests on my Flask webapp always time out after 1 minute
I made a small webapp with Python Flask where a response to a request can take up to max 5 minutes. However, after 1 minute the request always time out, returning an ERR_EMPTY_RESPONSE page. I have ...
1vote
0answers
71views
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 ...
0votes
0answers
154views
Cannot make Python 3.10 virtual environment work with mod_wsgi / Apache webserver
I'm trying to set up a Flask webserver. I'm trying to use virtual environment with Python 3.10. I've been at it for hours, and probably have tried every suggested solution from SO, but they all don't ...
0votes
1answer
120views
Mod_Wsgi Error: "invalid Invalid command 'WSGIScriptAlias', perhaps misspelled or defined by a module not included in the server configuration...."
I am trying to run a Django project through Apache with Mod_wsgi on Windows. I installed Apache as a service and installed mod_wsgi to my Python, and then copied it over to my Apache modules. I added ...
0votes
0answers
49views
Form upload does not work when flask, apache, mod_wsgi, and Windows are combined
I am developing a web app and one of the basic functionalities is file uploading. However, I am experiencing a 500 server error with the following configuration:
Python 3.10
Flask 2.0.2
Apache 2.4.51
...
0votes
0answers
52views
IONOS connect to root via filezilla etc
I've a vserver from ionos.
I'm trying to setup my Server to deploy a django project, in the way shown here:
https://support.plesk.com/hc/en-us/articles/115000248869-How-to-configure-root-directory-for-...
0votes
1answer
71views
Internal server error - CSRF token has expired - wsgi error file csrf.py line 110 csrf validation SyntaxError: invalid syntax
Issues deploying a flask app using WSGI and Apache server over Ubuntu 18.04
Issues:
Trying to load the web page from the browser an Internal server error is shown.
Wsgi error logged describing issue ...
0votes
0answers
76views
AttributeError: 'WindowsPath' object has no attribute 'endswith' when using runmodwsgi Django command
Windows 10, Python 3.8.10, Apache 2.4.51, Django 3.2.8, mod_wsgi 4.9.0
When I try to run the Apache server using python manage.py runmodwsgi, I get this output:
Successfully ran command.
Server URL ...
0votes
0answers
38views
mod_wsgi-express module-config command not working during django deployment on apache
During the deployment of my Django Project with Apache and mod_wsgi on Windows10. I have installed Apache24 in my C drive and its working fine. After that I have installed openpyxl and mod_wsgi with ...
0votes
1answer
35views
Issue deploying flask application on Apache server
Setup:
CentOS
Apache
Python 3.6
flask
flask-cors
I'm getting this error when deploying my application:
mod_wsgi (pid=18182): Failed to exec Python script file '/var/www/www.refinance.com.au/refinance/...
0votes
0answers
39views
"Wsgi : error PermissionError : Permission denied:imm_migration.log ",Apache, Flask
I have a python/flask app running on apache server
When accessed from web, the app gives "internal server error"
I have tried to play around with other possible permission settings. I have ...
0votes
1answer
185views
Target WSGI script cannot be loaded as Python module.Flask.Apache
I have a application in flask and built for python3.8. I am trying to deploy it using apache and have been having issues.
I installed wsgi using the command: sudo apt-get install libapache2-mod-wsgi-...
0votes
0answers
24views
why my python web info/warning level log is written to apache error log?
I found my python web all log is written to the apache error log. And the apache error log has a two-level log record.
Is it because I have some configuration problems?
my virtualhost
<...
0votes
0answers
34views
Unable to setup https and enable ssl on Apache mod_wsgi django server
I want to setup https and enable ssl for my django application which runs on a apache mod_wsgi server. I have my ssl certificates in my project directory. Here is the command which I use for starting ...
0votes
0answers
46views
Django - XAMPP - Apache - Cookiecutter
I have a Django project configured using cookiecutter and I need to deploy the proyect using XAMPP and apache with mod_wsgi on windows 10. I already try some solutions but does not work for me. This ...
1vote
0answers
24views
flask mod_wsgi apache windows redirect error
I have a problem with mod_wsgi and flask on Windows 10.
When I start app from console with "flusk run" it's work,
but from apache I've got an error INET_E_REDIRECT_FAILED
Here is my ...
-1votes
1answer
145views
How to fix an error message when installing mod_wsgi?
when I type pip install mod_wsgi in my pycharm terminal(venv activated), an error is shown below , I have mod_wsgi on python 38(which is already in used with 1 of the project in apache) and I am ...
0votes
1answer
46views
Apache Won't Start, Encodings cannot be found
There are a lot of similar questions noting that they could not get Apache (2.4) started due to improperly created "PYTHONHOME" and "PYTHONPATH" variables.
I have installed ...