我一直在尝试在apache上部署django,这是我的httpd.conf文件
<VirtualHost *:80>
WSGIPassAuthorization On
WSGIDaemonProcess app1 python-path=/home/naveen/cloudserver:/home/naveen/cloudserver
WSGIScriptAlias /radi /home/naveen/cloudserver/cloudserver/wsgi.py application-group=%{GLOBAL} process-group=app1
<Directory /home/naveen/cloudserver/>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
DocumentRoot /home/naveen/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
这是我的wsgi.py文件
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cloudserver.settings')
application = get_wsgi_application()
当我尝试打开此应用程序时,出现内部服务器错误,这是我的日志文件,显示以下错误
[Wed Dec 26 08:42:42.730573 2018] [wsgi:error] [pid 1846] File "<frozen importlib._bootstrap>", line 969, in _find_and_load
[Wed Dec 26 08:42:42.730578 2018] [wsgi:error] [pid 1846] File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
[Wed Dec 26 08:42:42.730595 2018] [wsgi:error] [pid 1846] ImportError: No module named 'cloudserver'
它说模块找不到cloudserver,如何解决这个错误?该文件夹中存在cloudserver模块?我已经在此阶段停留了将近2天,每个教程我都试图在此错误中使用endup。如何正确配置django项目使其在apache上运行?
更新 这是我的目录结构,它位于/ home / naveen /