Apache 2.4 – Django and ISPConfig 3 – ERROR 500 internal server error

You tried to deploy django using the ispconfig control panel and you encountered an ERROR 500 internal server error. The Apache error logs are irrelevant to the error, and the /var/log/ispconfig/httpd/example.com/error.log at:

[my-home-ip-address]    - - [27/Apr/2019:19:23:25 +0000] "GET / HTTP / 1.1" 500 2119 "-" "Mozilla / 5.0 (X11; Linux x86_64; rv: 66.0) Gecko / 20100101 Firefox / 66.0"

my settings.py file

"" "
Django settings for project example.

Generated by & django-admin startproject & # 39; under Django 2.2.

For more information on this file, see
https://docs.djangoproject.com/fr/2.2/topics/settings/

For a complete list of parameters and their values, see
https://docs.djangoproject.com/fr/2.2/ref/settings/
"" "

bone import

# Build the paths in the project like this: os.path.join (BASE_DIR, ...)
BASE_DIR = os.path.dirname (os.path.dirname (os.path.abspath (__ file__)))


# Quick start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/

# SAFETY WARNING: keep the secret key used in production!
SECRET_KEY = & # 39; x (n (0 & + g-tnnb8! 15 * 3fl2ta * 7 $ ^ jz = 5- * 5 ((i *) - mk! -Rhzsn & # 39;

# SECURITY WARNING: Do not run with debugging enabled in production!
DEBUG = True

ALLOWED_HOSTS = ["example.com", "45.58.37.57", "127.0.0.1"]


# Definition of application

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
]

MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = & # 39; example.urls & # 39;

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
& # 39; APP_DIRS & # 39 ;: True,
& # 39; OPTIONS & # 39 ;: {
& # 39; & # 39 ;: context_processors [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
}
}
]WSGI_APPLICATION = & # 39; example.wsgi.application & # 39;


# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases

DATABASES = {
'Default': {
& # 39; ENGINE & # 39 ;: django.db.backends.sqlite3 & # 39;
& # 39; NAME: os.path.join (BASE_DIR, & dquo; db.sqlite3 & # 39;),
}
}


# Validation of the password
# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
    {
        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
    },
]


# Internationalization
# https://docs.djangoproject.com/en/2.2/topics/i18n/

LANGUAGE_CODE = & # 39; en-us & # 39;

TIME_ZONE = UTC & # 39;

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.2/howto/static-files/

STATIC_URL = & # 39; / static / & # 39;
STATIC_ROOT = os.path.join (BASE_DIR, static / & # 39;)

my wsgi.py

"" "
WSGI configuration for example project.

It exposes the WSGI callable as a module-level variable named `` application``.

For more information on this file, see
https://docs.djangoproject.com/fr/2.2/howto/deployment/wsgi/
"" "

bone import
import system

from django.core.wsgi import get_wsgi_application

sys.path.append (& # 39; / var / www / clients / client25 / web30 & # 39;)
os.environ.setdefault (DJANGO_SETTINGS_MODULE & # 39 ;, example.settings & # 39;)

application = get_wsgi_application ()

my apache directives:

Alias ​​/ static / var / www / clients / client25 / web30 / web / static

        Require all granted



        
        
        
        Options Index FollowSymLinks includes ExecCGI
        
                Require all granted
        








Example with WSGIDaemonProcess user = web30 group = client25 python-home = / var / www / clients / client25 / web30 / web / venv path_python = / var / www / clients / client25 / web30 / web
Example of WSGIProcessGroup
WSGIScriptAlias ​​/ /var/www/clients/client25/web30/web/example/wsgi.py

I do not know how to identify the cause of the error. Any indication of where to look would be much appreciated.