Jump to content

Recommended Posts

Posted

I have tried to follow the guidelines for uploading a django project to my account, and I have tried to follow the wiki's guide to debug the dispatch.wsgi file, but I don't seem to be getting any productive feedback. The site was working on the django 1.3.7 development server.

 

Ideally, an index.html page powered by django would appear at <http://www.8bitphotos.com>, but only a directory index appears. I hit "500 Internal Server Error" when trying to access <http://www.8bitphoto...eightbitphotos/>, in which my project files are saved.

 

What do I need in order to get things running smoothly?? I've tried things from other forum topics but without any luck. Thanks for any help you can provide.

 

username: dvance

 

error log after trying to access <http://www.8bitphoto...eightbitphotos/>:

[sat May 11 19:12:58 2013] [error] [client 76.27.60.233] File does not exist: /home1/dvance/public_html/404.shtml

[sat May 11 19:12:58 2013] [error] [client 76.27.60.233] File does not exist: /home1/dvance/public_html/favicon.ico

[sat May 11 19:12:58 2013] [error] [client 76.27.60.233] File does not exist: /home1/dvance/public_html/500.shtml, referer: http://www.8bitphotos.com/

[sat May 11 19:12:58 2013] [error] [client 76.27.60.233] File "/home1/dvance/public_html/eightbitphotos/dispatch.wsgi", line 13, in application, referer: http://www.8bitphotos.com/

[sat May 11 19:12:58 2013] [error] [client 76.27.60.233] mod_wsgi (pid=20162): Exception occurred processing WSGI script '/home1/dvance/public_html/eightbitphotos/dispatch.wsgi'., referer: http://www.8bitphotos.com/

 

dispatch.wsgi file:

try:

import os, sys

sys.path.append("/home1/dvance/public_html/eightbitphotos");

 

os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'

os.environ['PYTHON_EGG_CACHE'] = '/home/dvance/.python_egg_cache'

 

import django.core.handlers.wsgi

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

 

def application(environ, start_response):

environ['PATH_INFO'] = environ['SCRIPT_NAME'] + environ['PATH_INFO']

return _application(environ, start_response) ### line 13

except:

import traceback

trace = traceback.format_exc()

def application(environ, start_response):

status = '500 Internal Server Error'

output = trace

 

response_headers = [('Content-type', 'text/plain'), ('Content-Length', str(len(output)))]

start_response(status, response_headers)

 

return [output]

Posted

  1. Download http://area52.heliohost.org/djangotest.zip
  2. Extract to a directory in your public_html
  3. Create /home/<username>/.python_egg_cache
  4. Chmod 777 .python_egg_cache
  5. Edit /home/<username>/public_html/<djangofolder>/dispatch.wsgi
  6. sys.path.append("/home/<username>/public_html/<djangofolder>");
  7. os.environ['PYTHON_EGG_CACHE'] = '/home/<username>/.python_egg_cache'

  • 2 weeks later...
Posted

Ok - I can get djangotest running, thanks for that.

 

I was able to go to "http://<mydomain>/djangotest" and the django page came up.

However, I tried to give the djangotest directory a new name and edit the dispatch.wsgi to match the new name. When I went to "http://<mydomain>/<newname>", a server error page came up telling me that it couldn't find "/djangotest/dispatch.wsgi." Why is it thinking to look there? I don't know anything else that references it. Why didn't it go to the new directory name?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...