Jump to content

[Solved] django configuration problem


sithfor

Recommended Posts

Hi. Before the DDoS my django application(a hello world) was working just fine. Now it only gives "Internal Server Error". The sys.path only shows: /usr/lib64/. I leave you the previous configuration that was working.

 

Thanks in advance.

 

 

.htaccess

 

AddHandler wsgi-script .wsgi

RewriteEngine On

RewriteBase /

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

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

 

---------------

 

dispatch.wsgi

 

import os, sys

sys.path.append("/home/sith/public_html/")

sys.path.append("/home/sith/public_html/mysite")

os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' #my project name phonebook

os.environ['PYTHON_EGG_CACHE'] = '/home/sith/.python_egg_cache' #right 775

import django.core.handlers.wsgi

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

 

---------------

 

from django.conf.urls.defaults import *

from mysite.views import hello

 

# Uncomment the next two lines to enable the admin:

# from django.contrib import admin

# admin.autodiscover()

 

urlpatterns = patterns('',

# Example:

# (r'^mysite/', include('mysite.foo.urls')),

 

# Uncomment the admin/doc line below and add 'django.contrib.admindocs'

# to INSTALLED_APPS to enable admin documentation:

# (r'^admin/doc/', include('django.contrib.admindocs.urls')),

 

# Uncomment the next line to enable the admin:

# (r'^admin/', include(admin.site.urls)),

('^$', hello),#the problem with this line is the default view(hello in this case) doesn't exist in #public_html

('^mysite/$', hello),

)

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...