Apache + Django 两个项目互窜的问题

配置django项目的wsgi.py

 1 """
  2 WSGI config for fanjie project.
  3 
  4 It exposes the WSGI callable as a module-level variable named ``application``.
  5 
  6 For more information on this file, see
  7 https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
  8 """
  9 
 10 import os
 11 
 12 from django.core.wsgi import get_wsgi_application
 13 import sys
 14 sys.path.append('/root/FanjieWebsite/fanjie')
 15 
 16 #os.environ.setdefault("DJANGO_SETTINGS_MODULE", "fanjie.settings")  # 这种写发回导致此问题,换下面写法OK
 17 os.environ["DJANGO_SETTINGS_MODULE"] = "fanjie.settings"
 18 application = get_wsgi_application()

你可能感兴趣的:(Apache + Django 两个项目互窜的问题)