系统信息:
腾讯云:centos7
Apache: 2.4
Django: 2.0
Python: anaconda 3
问题1:
[wsgi:warn] [pid 2894] (13)Permission denied: mod_wsgi (pid=2894): Unable to stat Python home /root/anaconda3. Python interpreter may not be able to be initialized correctly. Verify the supplied path and access permissions for whole of the path.
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
解决方式:
将/root或/root/anaconda3整个目录权限改成755: chmod 755 -R /root
问题2:
设置好的/static/或Django项目访问不到(404)
WSGIPythonHome "/root/anaconda3"
Listen 9001
<VirtualHost my_host:9001>
Alias /static /data/myProject/static
<Directory /data/myProject/static>
Require all granted
</Directory>
<Directory /da