Apache Wsgi virtualHost, Django virtual env “no module named django.core.wsgi”

后端 未结 1 761
谎友^
谎友^ 2021-01-25 12:59

I have seen plenty of previous messages related to my problem, but no answer could get rid of my "500 Server internal Error" so I try to post my conf to get help.

相关标签:
1条回答
  • 2021-01-25 13:18

    Several things to check for.

    1. Make sure that the virtualenv has django (pip freeze | grep django)
    2. Check if apache user can access the virtualenv by checking the folder permissions
    3. if you are using apache 2.4 + change the following

      Order deny,allow Allow from all

      to

      Require all granted

    Edit suggested by @marcoooo (OP) : don't put virtualenv base dir under any home dir which do not have 'x' flag, apache www-data user won't be able to activate the virtualenv either.... Many thanxs to e4c5 for his help, and saved my day (and nights)

    0 讨论(0)
提交回复
热议问题