Category : mod-wsgi

I have a multipage app with dash I routed pathnames with @app.callback function At the end of my app. Py i have if name equals to main app.start_server(debug=false,port=8051, host=’0.0.0.0′) In my app.wsgi i have import sys sys.path.insert(0, ‘/var/www/Site_Pub’) activate_this = ‘/home/username/.local/share/virtualenvs/Site_Pub-uAwqGz45/bin/activate_this.py’ with open(activate_this) as file: exec(file.read(), dict(__file__=activate_this)) from server import server as application And in ..

Read more

I am trying to deploy my first flask application on ubuntu, mod_wsgi, apache2 but the application is not working. here is the wsgi file #!/usr/bin/python import sys import logging logging.basicConfig(stream=sys.stderr) sys.path.insert(0,"/var/www/webApp") from webApp import app as application application.secret_key = ‘secret key’ here is the conf file <VirtualHost *:80> ServerName 198.58.123.253 ServerAdmin [email protected] WSGIScriptAlias / /var/www/webApp/webapp.wsgi ..

Read more

I can’t find out which python environment is being used or install location is being used by mod_wsgi in Apache. In my apache config I didn’t gave any specific venv config. ServerName ServerAlias DocumentRoot /home/Downloads ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /static /home/Downloads/static <Directory /home/Downloads/static> Require all granted </Directory> <Directory /home/Downloads/samples> Require all granted </Directory> ..

Read more

I have installed mod-wsgi from source, using Python3 (Apache 2.4.46 on an Amazon Linux 2 VM). Every time I reload my wsgi daemon, I get the following error in my Apache error log: Exception ignored in: <generator object path at 0x7f128e93fdd0> Traceback (most recent call last): File "/usr/lib64/python3.7/importlib/resources.py", line 190, in path NameError: name ‘FileNotFoundError’ ..

Read more

Added this to my windows server httpd.conf: LoadFile "c:/users/rootadmin/appdata/local/programs/python/python39/python39.dll" LoadModule wsgi_module "c:/users/rootadmin/appdata/local/programs/python/python39/lib/site-packages/mod_wsgi/server/mod_wsgi.cp39-win_amd64.pyd" WSGIPythonHome "c:/users/rootadmin/appdata/local/programs/python/python39" WSGIPythonPath "C:/Users/rootadmin/DSS_code/tdid/DSS/" <VirtualHost *:80> WSGIScriptAlias / C:/Users/rootadmin/DSS_code/tdid/DSS/DSS/wsgi.py <Directory "C:/Users/rootadmin/DSS_code/tdid/DSS/DSS"> Require all granted Alias /static "C:/Users/rootadmin/DSS_code/tdid/DSS/static" <Directory "C:/Users/rootadmin/DSS_code/tdid/DSS/static"> Require all granted When trying to run apache getting following error in error log: AH00418: Parent: Created child process 4596 Python path configuration: PYTHONHOME ..

Read more

I’m trying to deploy my Django project using Apache + mod-wsgi, but it occurred a 403 error which I’m unable to solve. I’ve substituted the 000-default.conf file to a custom file named Qxt_project.conf in /etc/apache2/sites-available/ Alias /static /home/scodasso/Qxt_project/static <Directory /home/scodasso/Qxt_project/static> Require all granted </Directory> Alias /media /home/scodasso/Qxt_project/media <Directory /home/scodasso/Qxt_project/media> Require all granted </Directory> <Directory /home/scodasso/Qxt_project/django_project> ..

Read more