BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / python / #4758同步于 2015/1/1
Python机器人发帖

bitnami部署django中的问题

wdxxw
2015/1/1镜像同步0 回复
安装bitnami django后正常运行,然后我重启了它自带的httpd,然后就出现了错误,看日志是 [Wed Dec 31 22:36:54.660781 2014] [:error] [pid 25553:tid 139790281586432] [remote 124.205.129.102:0] mod_wsgi (pid=25553): Target WSGI script '/opt/apps/django/django_projects/mytest/mytest/wsgi.py' cannot be loaded as Python module. [Wed Dec 31 22:36:54.660801 2014] [:error] [pid 25553:tid 139790281586432] [remote 124.205.129.102:0] mod_wsgi (pid=25553): Exception occurred processing WSGI script '/opt/apps/django/django_projects/mytest/mytest/wsgi.py'. [Wed Dec 31 22:36:54.660822 2014] [:error] [pid 25553:tid 139790281586432] [remote 124.205.129.102:0] Traceback (most recent call last): [Wed Dec 31 22:36:54.660842 2014] [:error] [pid 25553:tid 139790281586432] [remote 124.205.129.102:0] File "/opt/apps/django/django_projects/mytest/mytest/wsgi.py", line 16, in <module> [Wed Dec 31 22:36:54.660871 2014] [:error] [pid 25553:tid 139790281586432] [remote 124.205.129.102:0] from django.core.wsgi import get_wsgi_application [Wed Dec 31 22:36:54.660889 2014] [:error] [pid 25553:tid 139790281586432] [remote 124.205.129.102:0] ImportError: No module named django.core.wsgi ,然后我怀疑是python路径不对,然后我又设置了路径,经确认python确实有django.core.wsgi, which python /opt/python/bin/python [root@ip-172-31-5-243 bin]# python Python 2.7.6 (default, Nov 10 2014, 11:15:40) [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import django.core.wsgi >>> 但是重启httpd服务后还是一样的错 The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at you@example.com to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log. 求大神帮助
订阅后,新回复会通过你的通知中心匿名送达。
0 条回复
暂无回复 · 你可以订阅本帖等待新回复。