Развертывание Django с ошибкой сервера apache
У меня есть приложение django, развернутое на сервере apache. Ниже приведена информация об os и apache:
Server Version: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f mod_wsgi/4.6.8 Python/3.8
При перезапуске apache и попытке зайти на сайт у меня возникает такая ошибка:
/var/www/backend/venv2/lib/python3.8/site-packages/pandas/__init__.py:11: UserWarning: NumPy was imported from a Python sub-interpreter but NumPy does not properly support sub-interpreters. This will likely work for most users but might cause hard to track down issues or subtle bugs. A common user of the rare sub-interpreter feature is wsgi which also allows single-interpreter mode.
[wsgi:error] Improvements in the case of bugs are welcome, but is not on the NumPy roadmap, and full support may require significant effort to achieve.
....
[wsgi:error]
raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
[wsgi:error] django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
Как вы можете видеть, сначала выдается предупреждение о numpy, а затем ошибка о SECRET_KEY, которая должна была прочитать его из переменных среды.
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY')
Для решения этой проблемы я прочитал несколько текстов и другие вопросы на stackoverflow и даже попробовал следующую директиву в моем конфигурационном файле apache.
WSGIApplicationGroup %{GLOBAL}
но все еще ничего.