Jump to content

Apache Django And Mod_Wsgi


Recommended Posts

Hi,

I made a simple django application which can create polls and enables voting, all by following official django tutorial, and it worked with djangos built-in http server.

Then I found this free host and tried to put my app on it. I followed simple instructions given on homepage about how to setup django app on this server, but i could not make it work. Then i googled some tutorials about this but I still can't make it work.

 

What i wanted to do is to make my app work on root domain http://quiz.heliohost.org/.

The way it is now configured, I can only see a list of files and folders on root and when i enter quiz folder i get an error, which you can see at http://quiz.heliohost.org/quiz/.

 

I am really new to this so excuse my poor skill.

i would really appreciate any help.

 

this are my files:

 

.htaccess

 

RewriteEngine On

RewriteBase /

RewriteRule ^(media/.*)$ - [L]

RewriteRule ^(admin_media/.*)$ - [L]

RewriteRule ^(dispatch\.wsgi/.*)$ - [L]

RewriteRule ^(.*)$ quiz/dispatch.wsgi/$ [QSA,PT,L]

 

 

 

dispatch.wsgi

 

import os, sys

sys.path.append("/home/numitors/public_html/quiz");

sys.path.append("/home/numitors/public_html");

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

os.environ['PYTHON_EGG_CACHE'] = '/home/numitors/.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)

 

I also zipped my entire folder with the app so it is visible at http://quiz.heliohost.org/ as quiz.zip

I am really new to this so excuse my poor skill.

i would really appreciate any help.

Thanks in advance.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...