У меня есть сайт, который я хочу запустить. При использовании команды ruserver сайт работает отлично.
Однако, когда я пытаюсь запустить его на сервере apache, я получаю:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, email@domain.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
просматривая журнал, иногда в нем нет ничего нового, иногда оно имеет:
[Mon May 02 10:21:21 2011] [error] [client 78.83.251.195] return do_translate(message, 'ugettext')
[Mon May 02 10:21:21 2011] [error] [client 78.83.251.195] File "/usr/lib/python2.6/dist-packages/django/utils/translation/trans_real.py", line 270, in do_translate
[Mon May 02 10:21:21 2011] [error] [client 78.83.251.195] _default = translation(settings.LANGUAGE_CODE)
[Mon May 02 10:21:21 2011] [error] [client 78.83.251.195] File "/usr/lib/python2.6/dist-packages/django/utils/translation/trans_real.py", line 180, in translation
[Mon May 02 10:21:21 2011] [error] [client 78.83.251.195] default_translation = _fetch(settings.LANGUAGE_CODE)
[Mon May 02 10:21:21 2011] [error] [client 78.83.251.195] File "/usr/lib/python2.6/dist-packages/django/utils/translation/trans_real.py", line 163, in _fetch
[Mon May 02 10:21:21 2011] [error] [client 78.83.251.195] app = import_module(appname)
[Mon May 02 10:21:21 2011] [error] [client 78.83.251.195] File "/usr/lib/python2.6/dist-packages/django/utils/importlib.py", line 35, in import_module
[Mon May 02 10:21:21 2011] [error] [client 78.83.251.195] __import__(name)
[Mon May 02 10:21:21 2011] [error] [client 78.83.251.195] TemplateSyntaxError: Caught ImportError while rendering: No module named main
Однако у меня есть модуль 'main' в качестве папки и приложения в settings.py
На самом деле, если я закомментирую 'main' в настройках, он обнаружит похожую ошибку в следующем 'app', пока я не удалю их все, когда, конечно, ничего не работает.
Вот httpd.conf:
<VirtualHost *:80>
# Admin email, Server Name (domain name) and any aliases
ServerAdmin email@domain.com
ServerName domain.com
ServerAlias domain.com
Alias /admin_media/ /usr/lib/python2.6/dist-packages/django/contrib/admin/media/
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html
DocumentRoot /var/www/domain.com/
# Custom log file locations
LogLevel warn
ErrorLog /var/www/domain.com/log/error.log
CustomLog /var/www/domain.com/log/access.log combined
# Setup mod_wsgi
WSGIScriptAlias / /var/www/domain.com/dispatch.wsgi
<Directory /var/www/domain.com >
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
что мне делать?