2011-01-15 2 views
1

나는 다음 페이지에서 다 말했어.우분투 django

https://help.ubuntu.com/community/Django 

하지만 오류 페이지가 표시됩니다.

MOD_PYTHON ERROR

ProcessId: 2220 Interpreter:
'localhost.localdomain'

ServerName:
'localhost.localdomain' DocumentRoot: '/etc/apache2/htdocs'

URI: '/' Location:
'/' Directory: None Filename:
'/etc/apache2/htdocs' PathInfo:
'/'

Phase: 'PythonHandler' Handler:
'django.core.handlers.modpython'

Traceback (most recent call last):

File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent)

File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg)

File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1128, in _execute_target result = object(arg)

File "/usr/lib/pymodules/python2.6/django/core/handlers/modpython.py", line 228, in handler return ModPythonHandler()(req)

File "/usr/lib/pymodules/python2.6/django/core/handlers/modpython.py", line 191, in call self.load_middleware()

File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py", line 33, in load_middleware for middleware_path in settings.MIDDLEWARE_CLASSES:

File "/usr/lib/pymodules/python2.6/django/utils/functional.py", line 276, in getattr self._setup()

File "/usr/lib/pymodules/python2.6/django/conf/init.py", line 40, in _setup self._wrapped = Settings(settings_module)

File "/usr/lib/pymodules/python2.6/django/conf/init.py", line 75, in init raise ImportError("Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e))

ImportError: Could not import settings 'examples.settings' (Is it on sys.path? Does it have syntax errors?): No module named examples.settings

무엇이 잘못 될 수 있습니까?

여기 멍청한 놈.

+2

mod_python이 (가) 죽었습니다. 가장 빠른 시일 내에 mod_wsgi로 이동하는 것을 고려하십시오. –

+0

은 단계 II입니다. 처음에는 누군가가 내가 무엇을 잘못하고 있는지 말할 수 있다면 나에게 더 쉬울 것이다. :) – debuggerpk

답변

3

우분투 서버에서 프로덕션 용 django 프로젝트를 배포하는 경우 WSGI를 사용하는 것이 좋습니다. 쉽게 우분투에서 WSGI와 https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/

설치 아파치된다 : 그냥 장고 문서를 경작 경우

apt-get install libapache2-mod-wsgi 

당신은 당신이 설정 아파치 또는 아무것도 할 필요가 없습니다 장고를 탐구하고자합니다. 대신 manage.py runserver을 사용하십시오.

+0

감사합니다 :) .. 도와 줬어. – debuggerpk