Назад | Перейти на главную страницу

500 Внутренняя ошибка сервера при настройке Apache на Ubuntu + Django

Я пробовал использовать Apache на ubuntu 9.04 и получил ту же ошибку: Internal Server Error. Сервер обнаружил внутреннюю ошибку или неправильную конфигурацию и не смог выполнить ваш запрос.

Пожалуйста, свяжитесь с администратором сервера, webmaster @ localhost и сообщите им время возникновения ошибки и все, что вы могли сделать, что могло вызвать ошибку.

Дополнительная информация об этой ошибке может быть доступна в журнале ошибок сервера.

И мой apache / error.log:

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] ServerName: 'sapint2'

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] DocumentRoot: '/etc/apache2/htdocs' [Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] URI: '/' 

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] Location: '/' 

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] Directory: None 

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] Filename: '/etc/apache2/htdocs' 

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] PathInfo: '/' 

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] Traceback (most recent call last): 

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1537, in HandlerDispatch\n default=default_handler, arg=req, silent=hlist.silent)

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1229, in _process_target\n result = _execute_target(config, req, object, arg)

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line 1128, in _execute_target\n result = object(arg)

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/modpython.py", line 180, in handler\n return ModPythonHandler()(req)

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/modpython.py", line 142, in call\n self.load_middleware()

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 45, in load_middleware\n mod = import_module(mw_module)

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module\n import(name)

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/contrib/sessions/middleware.py", line 4, in \n from django.utils.cache import patch_vary_headers

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/utils/cache.py", line 25, in \n from django.core.cache import get_cache

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/core/cache/init.py", line 187, in \n cache = get_cache(DEFAULT_CACHE_ALIAS)

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/core/cache/init.py", line 179, in get_cache\n cache = backend_cls(location, params)

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File "/usr/local/lib/python2.7/dist-packages/django/core/cache/backends/memcached.py", line 139, in init\n "Memcached cache backend requires either the 'memcache' or 'cmemcache' library"

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] InvalidCacheBackendError: Memcached cache backend requires either the 'memcache' or 'cmemcache' library [Sat Oct 06 09:51:30 2012] [notice] caught SIGTERM, shutting down [Sat Oct 06 09:51:31 2012] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.

[Sat Oct 06 09:51:31 2012] [notice] mod_python: using mutex_directory /tmp

[Sat Oct 06 09:51:31 2012] [notice] Apache/2.2.17 (Ubuntu) PHP/5.3.5-1ubuntu7.11 with Suhosin-Patch mod_python/3.3.1 Python/2.7.1+ mod_wsgi/3.3 configured -- resuming normal operations

Мне нужна помощь спасибо

Какую версию Django вы используете? Вы пробовали действовать в соответствии с полученными сообщениями журнала и устанавливали одну из предложенных библиотек memcache? Это прямо там:

[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] File
  "/usr/local/lib/python2.7/dist-packages/django/core/cache/backends/memcached.py",
  line 139, in init\n "Memcached cache backend requires either the
 'memcache' or 'cmemcache' library"
[Sat Oct 06 09:32:04 2012] [error] [client 10.0.64.10] InvalidCacheBackendError:
  Memcached cache backend requires either the
 'memcache' or 'cmemcache' library

По этой причине ваш apache возвращает ошибку 500.