Index ソフト・ハード WSGI | WSGIの構成・方式 |
機能・要件 構成・方式 基本設定 wsgi.py タスク 導入 |
Django を Apache と mod_wsgi とともに使う場合の基本設定 ・httpd.confファイルに追加 (httpd.conf → Include conf.modules.d/*.conf → 10-wsgi-python3.conf)
WSGIScriptAlias / /path/to/mysite/config/wsgi.py (提供APのルートURL)
WSGIPythonHome /path/to/venv
WSGIPythonPath /path/to/mysite
<Directory /path/to/mysite/config>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
・参考wsgi.py ・デフォルト
"""
WSGI config for mysite 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/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')
application = get_wsgi_application()
|
All Rights Reserved. Copyright (C) ITCL |