apache - Django serving 500 errors for every view except root -
apache - Django serving 500 errors for every view except root -
so trying deploy production environment , getting 500 errors every view except root url: http://5buckchuck.com/
the errors appear apache errors, not fancy django ones:
internal server error
the server encountered internal error or misconfiguration , unable finish request.
please contact server administrator, webmaster@5buckchuck.com , inform them of time error occurred, , might have done may have caused error.
more info error may available in server error log.
per server error logs:
[thu jul 07 22:04:53 2011] [error] [client ip] request exceeded limit of 10 internal redirects due probable configuration error. utilize 'limitinternalrecursion' increment limit if necessary. utilize 'loglevel debug' backtrace.
info:
debugging set true i have tried syncdb, date i have connected db , looks there urls.py seems reflect urls in devi not quite sure go here. improve logging help. help appreciated.
per request:
settings.py
debug = true template_debug = debug template_loaders = ( 'django.template.loaders.filesystem.loader', 'django.template.loaders.app_directories.loader', #'django.template.loaders.eggs.loader', ) middleware_classes = ( 'django.middleware.common.commonmiddleware', 'django.contrib.sessions.middleware.sessionmiddleware', 'django.middleware.csrf.csrfviewmiddleware', 'django.contrib.auth.middleware.authenticationmiddleware', 'django.contrib.messages.middleware.messagemiddleware', ) authentication_backends = ( 'django.contrib.auth.backends.modelbackend', 'allauth.account.auth_backends.authenticationbackend', ) root_urlconf = 'fivebuckchuck.urls' template_dirs = ( '/home/myusername/5buckchuck.com/fivebuckchuck/templates' ) installed_apps = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', #5bc stuff 'winerater', #all-auth apps, 'emailconfirmation', 'uni_form', 'allauth', 'allauth.account', 'allauth.socialaccount', 'allauth.twitter', 'allauth.openid', ) template_context_processors = ( 'allauth.context_processors.allauth', 'allauth.account.context_processors.account', 'django.core.context_processors.media', 'django.contrib.auth.context_processors.auth', 'django.core.context_processors.request', )
and urls.py
from django.conf.urls.defaults import * winerater.views import * settings import media_root django.views.generic.simple import direct_to_template django.views.generic.simple import redirect_to # uncomment next 2 lines enable admin: django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # example: # (r'^mobile_5bc/', include('mobile_5bc.foo.urls')), # uncomment admin/doc line below , add together 'django.contrib.admindocs' # installed_apps enable admin documentation: (r'^admin/doc/', include('django.contrib.admindocs.urls')), (r'^admin/', include(admin.site.urls)), (r'^$', front_page), (r'^user/(\w+)/$', user_page), (r'^login/$', 'django.contrib.auth.views.login'), (r'^login/success/$', direct_to_template, {'template': 'front_page'}), #(r'^accounts/login/$', 'django.contrib.auth.views.login'), (r'^logout/$', logout_page), (r'^media/(?p<path>.*)$', 'django.views.static.serve', {'document_root': media_root}), (r'^register/$', register_page), (r'^register/success/$', redirect_to, {'url': '/login/'}), (r'^save/$', wine_add_page), (r'detail/(\w+)/', wine_detail_page), (r'wine_image/(\w+)/$', wine_image), (r'wines/([^\s]+)/$', wine_results), (r'review/(\w+)/$', wine_review_page), (r'^accounts/', include('allauth.urls')), (r'^accounts/profile/', front_page), )
and passenger_wsgi.py
import sys, os interp = '/home/myusername/local/bin/python' # actual username if sys.executable != interp: os.execl(interp, interp, *sys.argv) sys.path.append(os.getcwd()) sys.path.append(os.getcwd()+'/fivebuckchuck') os.environ['django_settings_module'] = "fivebuckchuck.settings" import django.core.handlers.wsgi application = django.core.handlers.wsgi.wsgihandler()
issue ended beingness dreamhost writing .htaccess file had items php in it, subverted django's url reading scheme. hope might help other users.
django apache deployment dreamhost
Comments
Post a Comment