У меня возникла проблема с настройкой двух отдельных проектов django на одном сервере, где я не могу использовать субдомены. Это привело меня к тому, что несколько приложений mod_wsgi на одном виртуальном хосте направлялись не на то приложение, что помогло использовать тег , чтобы приблизиться к решению.
Вот оставшаяся проблема. :
Я настроил 1 виртуальный хост с SSL и 2 разных «сайта»:
Код: Выделить всё
ServerName myserver.com
SSLEngine on
SSLCertificateFile /etc/httpd/ssl/myserver.com.crt
SSLCertificateKeyFile /etc/httpd/ssl/myserver.com.key
SSLCACertificateFile /etc/httpd/ssl/myserver.com.bundle
# anspl4fd configuration
Alias /anspl4fd/static/ /var/customers/webs/anspl4fd/static/
Require all granted
WSGIDaemonProcess anspl4fd python-home=/var/customers/python-env/anspl4fd python-path=/var/customers/webs/anspl4fd
WSGIScriptAlias /anspl4fd /var/customers/webs/anspl4fd/Webseite/wsgi.py
WSGIProcessGroup anspl4fd
Require all granted
# anscrd configuration
Alias /anscrd/static/ /var/customers/webs/anscrd/static/
Require all granted
WSGIScriptAlias /anscrd /var/customers/webs/anscrd/Webseite/wsgi.py
WSGIDaemonProcess anscrd python-home=/var/customers/python-env/anscrd python-path=/var/customers/webs/anscrd
WSGIProcessGroup anscrd
Require all granted
Код: Выделить всё
sys.stderr.write(f"Python executable: {sys.executable}\n")
sys.stderr.write(f"Python version: {sys.version}\n")
sys.stderr.write(f"Python path: {sys.path}\n")
Теперь добавляю:
Код: Выделить всё
sys.path.insert(0, '/var/customers/webs/anscrd') # Project directory
sys.path.insert(0, '/var/customers/python-env/anscrd/lib/python3.9/site-packages')
Но я бы предпочел знать, почему мои WSGIDaemonProcess работают неправильно — я в недоумении
Система:
Oracle Linux 9.4
Apache 2.4
Python 3.9
Django 4.2
Подробнее здесь: https://stackoverflow.com/questions/792 ... nvironment
Мобильная версия