・Djangoは venv で作成。
■Apache ./conf/httpd.conf
httpd.conf
############ Python Django 用設定 追加 ############
LoadFile C:/Users/natsume/AppData\Local/Programs/Python/Python39/python39.dll
LoadModule wsgi_module C:/Users\natsume/AppData/Local/Programs/Python/Python39/Lib\site-packages/mod_wsgi/server/mod_wsgi.cp39-win_amd64.pyd
WSGIPythonHome C:/Users\natsume/AppData/Local/Programs/Python/Python39
WSGIScriptAlias / D:/Django/django_project/django_project/wsgi.py
WSGIPythonPath D:/Django/django_project/django_project
<Directory D:/Django/django_project/django_project>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
Alias /static/ D:/Django/django_project/static
<Directory D:/Django/django_project/static>
Require all granted
</Directory>
############ Python Django 用設定 追加 END ############
■django の設定ファイル setting.py
Apacheのポート番号に合わせる
py setting.py
### Apacheの環境に合わせる
# ALLOWED_HOSTS =
# ALLOWED_HOSTS = ['localhost','127.0.0.1','*', '127.0.0.1:8082']
ALLOWED_HOSTS = ['localhost','127.0.0.1:8082','*','localhost:8082']