mod_wsgi icon indicating copy to clipboard operation
mod_wsgi copied to clipboard

wsgi-error

Open xolandaliso opened this issue 4 years ago • 1 comments

Hi there,

I'm trying to deploy, however I keep getting this wsgi error. I have installed the mod-wsgi express succesfully but still no luck. You perhaps have any idea where I'm messing it up? I'm working on an Ubuntu 20. server.

the error is :

[Thu Sep 16 10:04:29.502691 2021] [wsgi:error] [pid 905:tid 140111809185536] [client 196.21.185.85:64555] mod_wsgi (pid=905): Exception occurred processing WSGI script '/var/www/ft.salt.saao.ac.za/dist/wsgi.py'. [Thu Sep 16 10:04:29.578848 2021] [wsgi:error] [pid 905:tid 140111809185536] [client 196.21.185.85:64555] Traceback (most recent call last): [Thu Sep 16 10:04:29.578890 2021] [wsgi:error] [pid 905:tid 140111809185536] [client 196.21.185.85:64555] File "/var/www/ft.salt.saao.ac.za/dist/wsgi.py", line 28, in application [Thu Sep 16 10:04:29.578968 2021] [wsgi:error] [pid 905:tid 140111809185536] [client 196.21.185.85:64555] from app import create_app [Thu Sep 16 10:04:29.578987 2021] [wsgi:error] [pid 905:tid 140111809185536] [client 196.21.185.85:64555] File "/var/www/ft.salt.saao.ac.za/dist/app/init.py", line 5, in [Thu Sep 16 10:04:29.579059 2021] [wsgi:error] [pid 905:tid 140111809185536] [client 196.21.185.85:64555] from config import config [Thu Sep 16 10:04:29.579095 2021] [wsgi:error] [pid 905:tid 140111809185536] [client 196.21.185.85:64555] File "/var/www/ft.salt.saao.ac.za/dist/config.py", line 4, in [Thu Sep 16 10:04:29.579158 2021] [wsgi:error] [pid 905:tid 140111809185536] [client 196.21.185.85:64555] class Config: [Thu Sep 16 10:04:29.579174 2021] [wsgi:error] [pid 905:tid 140111809185536] [client 196.21.185.85:64555] File "/var/www/ft.salt.saao.ac.za/dist/config.py", line 28, in Config [Thu Sep 16 10:04:29.579199 2021] [wsgi:error] [pid 905:tid 140111809185536] [client 196.21.185.85:64555] datefmt='[%Y-%m-%d %H:%M:%S]') [Thu Sep 16 10:04:29.579213 2021] [wsgi:error] [pid 905:tid 140111809185536] [client 196.21.185.85:64555] File "/lib/python2.7/logging/init.py", line 1554, in basicConfig [Thu Sep 16 10:04:29.684592 2021] [wsgi:error] [pid 905:tid 140111809185536] [client 196.21.185.85:64555] hdlr = FileHandler(filename, mode) [Thu Sep 16 10:04:29.684637 2021] [wsgi:error] [pid 905:tid 140111809185536] [client 196.21.185.85:64555] File "/lib/python2.7/logging/init.py", line 920, in init [Thu Sep 16 10:04:29.684678 2021] [wsgi:error] [pid 905:tid 140111809185536] [client 196.21.185.85:64555] StreamHandler.init(self, self._open()) [Thu Sep 16 10:04:29.684694 2021] [wsgi:error] [pid 905:tid 140111809185536] [client 196.21.185.85:64555] File "/lib/python2.7/logging/init.py", line 950, in _open [Thu Sep 16 10:04:29.684717 2021] [wsgi:error] [pid 905:tid 140111809185536] [client 196.21.185.85:64555] stream = open(self.baseFilename, self.mode) [Thu Sep 16 10:04:29.684757 2021] [wsgi:error] [pid 905:tid 140111809185536] [client 196.21.185.85:64555] IOError: [Errno 13] Permission denied: '/var/www/ft.salt.saao.ac.za/error.log'

xolandaliso avatar Sep 16 '21 10:09 xolandaliso

Read:

  • https://modwsgi.readthedocs.io/en/master/user-guides/application-issues.html#access-rights-of-apache-user
  • https://modwsgi.readthedocs.io/en/master/user-guides/application-issues.html#application-working-directory

Permissions access is usually going to be due to one of those issues.

GrahamDumpleton avatar Sep 16 '21 10:09 GrahamDumpleton