Я развернул свое приложение в apache, но получение внутренней ошибки сервера 500 из-за некоторых проблем требует помощи, чтобы решить эту проблему
Перезапуск службы не помог мне решить эту проблему.
имя виртуального окружения = путь djangoprojectenv = / opt / djangoproject / djangoprojectenv / lib / python3.6 / site-packages
имя проекта - конечное имя & приложения - путь к проекту "final_app" - / opt /djangoproject / myproject / final
Журнал ошибок Apache (внутренняя ошибка сервера 500)
[:error] [pid 26320] Traceback (most recent call last):
[:error] [pid 26320] File "/opt/djangoproject/myproject/final/wsgi.py", line 16, in <module>
[:error] [pid 26320] [application = get_wsgi_application()
[:error] [pid 26320] File "/opt/djangoproject/djangoprojectenv/lib/python3.6/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
[:error] [pid 26320] django.setup(set_prefix=False)
[:error] [pid 26320] File "/opt/djangoproject/djangoprojectenv/lib/python3.6/site-packages/django/__init__.py", line 27, in setup
[:error] [pid 26320] apps.populate(settings.INSTALLED_APPS)
[:error] [pid 26320] File "/opt/djangoproject/djangoprojectenv/lib/python3.6/site-packages/django/apps/registry.py", line 78, in populate
[:error] [pid 26320] raise RuntimeError("populate() isn't reentrant")
[:error] [pid 26320] RuntimeError: populate() isn't reentrant
WSGI.py file [Имя проекта- "final"]
"""
WSGI config for final project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "final.settings")
application = get_wsgi_application()
Наконец, мой / etc / httpd / conf.d / django.conf как
Alias /static /opt/djangoproject/myproject/static
<Directory /opt/djangoproject/myproject/static>
Require all granted
</Directory>
<Directory /opt/djangoproject/myproject/final>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess final python-path=/opt/djangoproject/myproject:/opt/djangoproject/djangoprojectenv/lib/python3.6/site-packages
WSGIProcessGroup final
WSGIScriptAlias / /opt/djangoproject/myproject/final/wsgi.py