2010-04-21 8 views
1

Eh bien, je marche autour de cela depuis quelques jours maintenant ... Je pense qu'il est temps de demander de l'aide, je pense que mon installation est ok ... Server OS: Centos 5 Python -v -v 2.6.5 Django (1, 1, 1, 'finale', 0)Django Déployer problème

mon apache conf:

<VirtualHost *:80> 
    DocumentRoot /opt/workshop 
    ServerName taller.antell.com.py 
    WSGIScriptAlias//opt/workshop/workshop.wsgi 
    WSGIDaemonProcess taller.antell.com.py user=ignacio group=ignacio processes=2 threads=25 
    ErrorLog /opt/workshop/apache.error.log 
    CustomLog /opt/workshop/apache.custom.log combined 

    <Directory "/opt/workshop"> 
      Options +ExecCGI +FollowSymLinks -Indexes -MultiViews 
      AllowOverride All 
      Order allow,deny 
      Allow from all 
    </Directory> 
</VirtualHost> 

ma mod_wsgi conf:

import os 
import sys 

sys.path.append('/opt/workshop') 

os.environ['DJANGO_SETTINGS_MODULE'] = 'workshop.settings' 
os.environ['PYTHON_EGG_CACHE'] = '/tmp/.python-eggs' 

import django.core.handlers.wsgi 
application = django.core.handlers.wsgi.WSGIHandler() 

l'erreur que je « M obtenir sur mon erreur apache journal est:

[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] mod_wsgi (pid=11459): Exception occurred processing WSGI script '/opt/workshop/workshop.wsgi'. 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] Traceback (most recent call last): 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 241, in __call__ 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  response = self.get_response(request) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/core/handlers/base.py", line 134, in get_response 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  return self.handle_uncaught_exception(request, resolver, exc_info) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/core/handlers/base.py", line 154, in handle_uncaught_exception 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  return debug.technical_500_response(request, *exc_info) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/views/debug.py", line 40, in technical_500_response 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  html = reporter.get_traceback_html() 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/views/debug.py", line 114, in get_traceback_html 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  return t.render(c) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 178, in render 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  return self.nodelist.render(context) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 779, in render 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  bits.append(self.render_node(node, context)) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/template/debug.py", line 81, in render_node 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  raise wrapped 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] TemplateSyntaxError: Caught an exception while rendering: No module named vehicles 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] Original Traceback (most recent call last): 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/template/debug.py", line 71, in render_node 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  result = node.render(context) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/template/debug.py", line 87, in render 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  output = force_unicode(self.filter_expression.resolve(context)) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/template/__init__.py", line 572, in resolve 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  new_obj = func(obj, *arg_vals) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/template/defaultfilters.py", line 687, in date 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  return format(value, arg) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/utils/dateformat.py", line 269, in format 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  return df.format(format_string) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/utils/dateformat.py", line 30, in format 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  pieces.append(force_unicode(getattr(self, piece)())) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/utils/dateformat.py", line 175, in r 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  return self.format('D, j M Y H:i:s O') 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/utils/dateformat.py", line 30, in format 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  pieces.append(force_unicode(getattr(self, piece)())) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/utils/encoding.py", line 71, in force_unicode 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  s = unicode(s) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/utils/functional.py", line 201, in __unicode_cast 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  return self.__func(*self.__args, **self.__kw) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/utils/translation/__init__.py", line 62, in ugettext 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  return real_ugettext(message) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 286, in ugettext 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  return do_translate(message, 'ugettext') 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 276, in do_translate 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  _default = translation(settings.LANGUAGE_CODE) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 194, in translation 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  default_translation = _fetch(settings.LANGUAGE_CODE) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 180, in _fetch 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  app = import_module(appname) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  __import__(name) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] ImportError: No module named vehicles 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] mod_wsgi (pid=11463): Exception occurred processing WSGI script '/opt/workshop/workshop.wsgi'. 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] Traceback (most recent call last): 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 241, in __call__ 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  response = self.get_response(request) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/core/handlers/base.py", line 73, in get_response 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  response = middleware_method(request) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/middleware/common.py", line 56, in process_request 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  if (not _is_valid_path(request.path_info) and 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/middleware/common.py", line 142, in _is_valid_path 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  urlresolvers.resolve(path) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/core/urlresolvers.py", line 303, in resolve 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  return get_resolver(urlconf).resolve(path) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/core/urlresolvers.py", line 218, in resolve 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  sub_match = pattern.resolve(new_path) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/core/urlresolvers.py", line 216, in resolve 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  for pattern in self.url_patterns: 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/core/urlresolvers.py", line 245, in _get_url_patterns 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/core/urlresolvers.py", line 240, in _get_urlconf_module 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  self._urlconf_module = import_module(self.urlconf_name) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] File "/opt/python2.6/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122]  __import__(name) 
[Wed Apr 21 15:17:48 2010] [error] [client 190.128.226.122] ImportError: No module named vehicles.urls 

S'il vous plaît donner ma main, je coincé ... est évidemment un problème avec mon module de véhicule (le seul l'un dans l'application), une autre chose est que lorsque je tente:

[[email protected] workshop]# python manage.py runserver 0:8000 

l'application fonctionne parfaitement, je pense que le problème est quelque chose près de la wsgi conf, quelque chose ne clique pas ....

TKS ...

Mise à jour: atelier dir ressemble ...

[[email protected] workshop]# ls -l 
total 504 
-rw-r--r-- 1 root root 22706 Apr 21 15:17 apache.custom.log 
-rw-r--r-- 1 root root 408141 Apr 21 15:17 apache.error.log 
-rw-r--r-- 1 root root  0 Apr 17 10:56 __init__.py 
-rw-r--r-- 1 root root 124 Apr 21 11:09 __init__.pyc 
-rw-r--r-- 1 root root 542 Apr 17 10:56 manage.py 
-rw-r--r-- 1 root root 3326 Apr 17 10:56 settings.py 
-rw-r--r-- 1 root root 2522 Apr 21 11:09 settings.pyc 
drw-r--r-- 4 root root 4096 Apr 17 10:56 templates 
-rw-r--r-- 1 root root 381 Apr 21 13:42 urls.py 
-rw-r--r-- 1 root root 398 Apr 21 13:00 urls.pyc 
drw-r--r-- 2 root root 4096 Apr 21 13:44 vehicles 
-rw-r--r-- 1 root root 38912 Apr 17 10:56 workshop.db 
-rw-r--r-- 1 root root 263 Apr 21 15:30 workshop.wsgi 

véhicules dir

[[email protected] vehicles]# ls -l 
total 52 
-rw-r--r-- 1 root root 390 Apr 17 10:56 admin.py 
-rw-r--r-- 1 root root 967 Apr 21 13:00 admin.pyc 
-rw-r--r-- 1 root root 732 Apr 17 10:56 forms.py 
-rw-r--r-- 1 root root 2086 Apr 21 13:00 forms.pyc 
-rw-r--r-- 1 root root 0 Apr 17 10:56 __init__.py 
-rw-r--r-- 1 root root 133 Apr 21 11:36 __init__.pyc 
-rw-r--r-- 1 root root 936 Apr 17 10:56 models.py 
-rw-r--r-- 1 root root 1827 Apr 21 11:36 models.pyc 
-rw-r--r-- 1 root root 514 Apr 17 10:56 tests.py 
-rw-r--r-- 1 root root 989 Apr 21 13:44 tests.pyc 
-rw-r--r-- 1 root root 1035 Apr 17 10:56 urls.py 
-rw-r--r-- 1 root root 1935 Apr 21 13:00 urls.pyc 
-rw-r--r-- 1 root root 3164 Apr 17 10:56 views.py 
-rw-r--r-- 1 root root 4081 Apr 21 13:00 views.pyc 

Mise à jour 2: ceci est mon settings.py

# Django settings for workshop project. 

DEBUG = True 
TEMPLATE_DEBUG = DEBUG 

ADMINS = (
    ('Ignacio Rojas', '[email protected]'), 
    ('Fabian Biedermann', '[email protected]'), 
) 

MANAGERS = ADMINS 

DATABASE_ENGINE = 'sqlite3' 
DATABASE_NAME = '/opt/workshop/workshop.db' 
DATABASE_USER = '' 
DATABASE_PASSWORD = '' 
DATABASE_HOST = '' 
DATABASE_PORT = '' 

# Local time zone for this installation. Choices can be found here: 
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name 
# although not all choices may be available on all operating systems. 
# If running in a Windows environment this must be set to the same as your 
# system time zone. 
TIME_ZONE = 'America/Asuncion' 

# Language code for this installation. All choices can be found here: 
# http://www.i18nguy.com/unicode/language-identifiers.html 
LANGUAGE_CODE = 'es-py' 

SITE_ID = 1 

# If you set this to False, Django will make some optimizations so as not 
# to load the internationalization machinery. 
USE_I18N = True 

# Absolute path to the directory that holds media. 
# Example: "/home/media/media.lawrence.com/" 
MEDIA_ROOT = '' 

# URL that handles the media served from MEDIA_ROOT. Make sure to use a 
# trailing slash if there is a path component (optional in other cases). 
# Examples: "http://media.lawrence.com", "http://example.com/media/" 
MEDIA_URL = '' 

# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a 
# trailing slash. 
# Examples: "http://foo.com/media/", "/media/". 
ADMIN_MEDIA_PREFIX = '/media/' 

# Make this unique, and don't share it with anybody. 
SECRET_KEY = '11y0_jb=+b4^[email protected]#g$-ihk5*v&[email protected]*9$w8jalp' 

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware', 
    'django.contrib.sessions.middleware.SessionMiddleware', 
    'django.contrib.auth.middleware.AuthenticationMiddleware', 
) 

ROOT_URLCONF = 'workshop.urls' 

TEMPLATE_DIRS = (
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". 
    # Always use forward slashes, even on Windows. 
    # Don't forget to use absolute paths, not relative paths. 
    "/opt/workshop/templates" 
) 

INSTALLED_APPS = (
    'django.contrib.admin', 
    'django.contrib.auth', 
    'django.contrib.contenttypes', 
    'django.contrib.sessions', 
    'django.contrib.sites', 
    'workshop.vehicles', 
) 

TEMPLATE_CONTEXT_PROCESSORS = (
    'django.core.context_processors.auth', 
    'django.core.context_processors.debug', 
    'django.core.context_processors.i18n', 
    'django.core.context_processors.media', 
) 

C'est ce qui transmet le test de: http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html

__name__ = settings 
__file__ = /opt/django/workshop/settings.pyc 
os.getpid() = 7207 
os.getcwd() = /opt/django/workshop 
os.curdir = . 
sys.path = ['/opt/django', '/opt/django/workshop', '/opt/django/workshop', '/opt/python2.6/lib/python26.zip', '/opt/python2.6/lib/python2.6', '/opt/python2.6/lib/python2.6/plat-linux2', '/opt/python2.6/lib/python2.6/lib-tk', '/opt/python2.6/lib/python2.6/lib-old', '/opt/python2.6/lib/python2.6/lib-dynload', '/opt/python2.6/lib/python2.6/site-packages'] 
sys.modules.keys() = ['copy_reg', 'encodings', 'site', '__builtin__', '__main__', 'encodings.encodings', 'abc', 'posixpath', 'errno', 'encodings.codecs', '_abcoll', 'types', '_codecs', '_warnings', 'genericpath', 'stat', 'zipimport', 'encodings.__builtin__', 'warnings', 'UserDict', 'encodings.utf_8', 'sys', 'codecs', 'os.path', 'settings', 'signal', 'linecache', 'posix', 'encodings.aliases', 'exceptions', 'os'] 
sys.modules.has_key('workshop') = False 
__name__ = workshop.settings 
__file__ = /opt/django/workshop/settings.pyc 
os.getpid() = 7207 
os.getcwd() = /opt/django/workshop 
os.curdir = . 
sys.path = ['/opt/django', '/opt/django/workshop', '/opt/django/workshop', '/opt/python2.6/lib/python26.zip', '/opt/python2.6/lib/python2.6', '/opt/python2.6/lib/python2.6/plat-linux2', '/opt/python2.6/lib/python2.6/lib-tk', '/opt/python2.6/lib/python2.6/lib-old', '/opt/python2.6/lib/python2.6/lib-dynload', '/opt/python2.6/lib/python2.6/site-packages'] 
sys.modules.keys() = ['django.core.exceptions', 'django.core.management.django', 'copy_reg', 'sre_compile', 'django.conf.os', 'locale', '_sre', 'functools', 'encodings', 'django.conf.global_settings', 'site', '__builtin__', 'django.core.management', 'django.core.management.sys', 'django.utils.functional', '__main__', 'operator', 'encodings.encodings', 'django.utils.re', 'django.core.management.imp', 'django.core.management.color', 'abc', 'posixpath', 'django.utils', 'imp', 'errno', 'encodings.codecs', 'gettext', 'sre_constants', 'django.conf', 're', '_abcoll', 'types', 'django.utils.importlib', '_codecs', 'django.core.management.optparse', 'django.core.management.base', '_struct', '_warnings', 'django.conf.django', 'genericpath', 'stat', 'zipimport', 'encodings.__builtin__', 'string', 'django.utils.termcolors', 'warnings', 'optparse', 'UserDict', 'struct', 'encodings.utf_8', 'django.utils.sys', 'textwrap', 'sys', 'django.django', 'codecs', 'django.utils.version', 'django.utils.os', 'copy', 'workshop.settings', 'os.path', 'strop', '_functools', '_locale', 'django.conf.time', 'django.conf.re', 'workshop.sys', 'settings', 'workshop', 'signal', 'django.core', 'django.utils.django', 'django', 'django.core.management.os', 'linecache', 'posix', 'encodings.aliases', 'time', 'exceptions', 'sre_parse', 'os', 'workshop.os'] 
sys.modules.has_key('workshop') = True 
sys.modules['wokshop'].__name__ = workshop 
sys.modules['workshop'].__file__ = /opt/django/workshop/__init__.pyc 
os.environ['DJANGO_SETTINGS_MODULE'] = workshop.settings 

nouvelle wsgi:

import sys 

sys.path.insert(0, '/opt/django/workshop') 
sys.path.insert(0, '/opt/django') 

import settings 

import django.core.management 
django.core.management.setup_environ(settings) 
utility = django.core.management.ManagementUtility() 
command = utility.fetch_command('runserver') 

command.validate() 

import django.conf 
import django.utils 

django.utils.translation.activate(django.conf.settings.LANGUAGE_CODE) 

import django.core.handlers.wsgi 

application = django.core.handlers.wsgi.WSGIHandler() 

Solved avec:

chmod -R 755 workshop && chown -R apache:apache workshop 
+0

Pouvez-vous afficher la structure de votre répertoire? En particulier, avez-vous par hasard un deuxième répertoire 'workshop' dans votre répertoire principal' workshop', qui contient les applications actuelles? –

+0

-rw-r - r-- 1 racine racine apache.custom.log -rw-r - r-- 1 racine racine apache.error.log -rw-r - r-- 1 racine racine __init__ .py -rw-r - r-- 1 racine racine __init __. pyc -rw-r - r-- 1 racine racine manage.py -rw-r - r-- 1 racine racine settings.py -rw-r - r-- 1 racine racine settings.pyc drw-r - r-- 4 modèles racine racine -rw-r - r-- 1 racine racine urls.py -rw-r --r-- 1 racine racine urls.pyc drw-r - r-- 2 véhicules racine racine -rw-r - r-- 1 racine racine workshop.db -rw-r - r-- 1 racine root workshop.wsgi –

+0

Essayez d'aplatir cela avec 'ls -1', et éditez votre question pour que nous puissions la voir. Le formatage est incorrect à cause du commentaire. –

Répondre

4

Essayez d'ajouter à la fois le répertoire contenant le fichier settings.py et son répertoire parent à sys.path. Mieux encore, lisez 'http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html' et utilisez le contenu du fichier de script WSGI décrit juste à la fin (après avoir lu le post pour savoir pourquoi c'est un problème). :-)


MISE À JOUR 1

Dans un autre commentaire que vous postez vos permissions 'DRW-r - r-- 2 véhicules racine root'.

Le bit 'x' n'est défini sur le répertoire pour personne. Cela entraînera l'échec de tout ce qui doit être capable de générer une liste de répertoires pour voir ce qui se trouve dans le répertoire. En d'autres termes, regardez toutes les permissions de votre répertoire et fixez les choses à 'drwxr-xr-x'. De plus, comme vous avez créé des répertoires appartenant à root, si votre application a besoin d'écrire dans un répertoire, elle ne pourra pas le faire.

En résumé, les problèmes d'autorisations de répertoire/fichier.

+0

c'est un peu embarrassant mais un chmod -R 755 atelier && chown -R apache: atelier apache résolu le cas ... Merci à vous tous! –

+0

homme, cela a sauvé ma journée. problème totalement différent cependant. MERCI! – Ulf

0

Je pense que votre chemin est en fait /opt/workshop/workshop/

Donc dans votre fichier wsgi vous devriez avoir sys.path.append('/opt/workshop/workshop') Et si ce n'est pas cas, que workshop.settings devrait être settings à la place.

[edit] La façon dont je le vois vous avez 3 options.

  1. Ajouter opt à sys.chemin si workshop.urls et ce travail (mauvaise idée AMHA depuis opt pourraient inclure anything`
  2. Supprimer workshop de tous les chemins
  3. Déplacer le code Python dans un répertoire workshop (ou autre chose) (assurez-vous qu'il contient un __init__.py)

Personnellement, je prendrais l'option 3 car sinon vous pourrez mélanger vos applications de python avec le reste (les médias, les modèles, etc ...)

+0

Il ne peut pas être/opt/workshop/workshop/ou apache ne produirait pas de logs dans le répertoire sur lequel il a fait un 'ls'. –

+0

Je pense que c'est le dernier. Si son/opt/workshop est sur le chemin du système, alors la structure du répertoire/opt/workshop/workshop fonctionnerait réellement - au moins le module settings serait de toute façon à workshop.settings. –

+0

C'est vrai Jack M. Dans ce cas, c'est probablement les réglages qui le détruisent maintenant :) – Wolph