Thanks for your help on this Karen, Its apache returning the 404. So as i suspected the rewrite rules are not working for some reason. Yes admin is in the urls. Sure the rewrite rules - rewrites www.musicischarity.com to www.musicischarity.com/home so it really should be working off the bat.
Initially i got in touch with my hosting provider to confirm the rewrite rules were working - which they confirmed. Ive just sent an email again. On Apr 14, 3:21 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Mon, Apr 14, 2008 at 3:41 AM, Aldo <[EMAIL PROTECTED]> wrote: > > Yes, so thats fair enough - it just means that maybe MAYBE the dj > > script is being called - but when i access it viawww.gfdfdf.com/admin/ > > it gives me a 404 > > (You've switched > fromhttp://www.musicischarity.comtowww.gfdfdf.com<http://www.gfdfdf.com/admin/> > ?) > > So the next step is to figure out if the 404 is coming from Apache or > Django. Do you have the admin urls configured for your Django app? If not, > then it's expected you'd get a 404 trying to access that url -- I just used > it as an example of one that might work since I have no idea what your own > application urls are. > > Some ways to determine if the 404 is coming from Apache or Django: > 1 - appearance -- does it look like the standard Apache "not found" or your > own 404.html template? > 2 - turn on DEBUG=True in your settings file and you will see the Django > debug "page not found" page that includes all the urlpatterns and how the > one it was handed didn't match any of them, if you are getting to Django > 3 - the Apache error log will have "File not found" errors listed for > something ending in "admin" if it is Apache returning the 404, but not if it > is Django. > 4 - How long does it take for the 404 to be returned? Quick means it's > probably coming from Apache, slow means probably your script is running and > it's your app/Django that is ultimately returning the 404. (This config is > a VERY slow way of running Django, and I'm not sure you will find > performance acceptable even if/when you get it to work.) > > If it is Apache returning the 404 then somehow your rewrite rules are not > kicking in. What you list below rewrites everything ending in a slash (you > did include the trailing slash on the attempt to access admin?) except for > those that start with cgi-bin or media, plus it rewrites an empty url to a > Django url of 'home/' (so you'd need a urlpattern for 'home/' in your Django > config). > > If it is Django returning the 404 than the urlpattern configuration is not > handling the incoming urls as you expect, and you need to fix them. > > Karen > > > On Apr 11, 4:28 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > > On Fri, Apr 11, 2008 at 9:28 AM, Aldo <[EMAIL PROTECTED]> wrote: > > > > > Fair point. > > > > > My problem is - Initially i created my index.html in the root(DOCUMENT > > > > ROOT). > > > > Now I have downloaded Django as described - put it in my root. > > > > I have created my .htaccess files as > > > > RewriteEngine on > > > > RewriteRule ^cgi-bin/ - [L] > > > > RewriteRule ^media/ - [L] > > > > RewriteRule ^(.*)(/)$ cgi-bin/dj/$1/ > > > > RewriteRule ^$ cgi-bin/dj/home/ > > > > Ive created the cgi-bin/dj file and gave permissions. > > > > However when i try to access that file(http://www.musicischarity.com/ > > > > cgi-bin/dj <http://www.musicischarity.com/cgi-bin/dj>) it gives me an > > > > error - Error 500: Internal Server Error > > > > You are not supposed to access the script directly like this. Rather > > you > > > are supposed to use your application's normal urls (e.g. > >http://www.muicscharity.com/admin/for, say, the Django admin app), and the > > > RewriteRules convert that to an invocation of your dj script. > > > > > (Usually I would have content-type in it - but its not in the > > > > examples. tried it and still no good.) > > > > The dj file was edited to contain my own details. paths etc. maybe i > > > > have them wrong. > > > > sys.path.append("/hsphere/local/home/musicisc/Django-0.96") > > > > sys.path.append("/hsphere/local/home/musicisc") > > > > and > > > > # Change this to the directory above your site code. > > > > sys.path.append("/hsphere/local/home/musicisc/Django-0.96/") > > > > os.chdir("/hsphere/local/home/musicisc/Django-0.96/") > > > > # Change mysite to the name of your site package > > > > os.environ['DJANGO_SETTINGS_MODULE'] = 'musicischarity.settings' > > > > run_with_cgi(django.core.handlers.wsgi.WSGIHandler()) > > > > > I am not sure anyone will be able to help - but my alternative is to > > > > give up - ive been working on this for hours. > > > > CGI is not at all a recommended way to run Django (see the discussion > > inhttp://code.djangoproject.com/ticket/2407) but it seems it can be made > > to > > > work after a fashion if it's your only option. > > > > Karen > > > > > On Apr 11, 1:23 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > > > > On Fri, Apr 11, 2008 at 6:48 AM, Aldo <[EMAIL PROTECTED]> wrote: > > > > > > > Hi folks I have a linux hosting account with digiweb. I want to > > run my > > > > > > django app on it - but am running into problems. > > >http://care.register365.com/index.php?_m=knowledgebase&_a=viewarticle. > > > > .. > > >http://seamusc.com/blog/2007/jun/11/how-get-django-working-digiwebie-. > > > > .. > > > > > > > I am trying to follow examples such as below but to no avail. > > Could > > > > > > anyone be able to help me out? or give me pointers? > > > > > > You provide links to two sites with detailed instructions on how to > > do > > > > what > > > > > you are interested in, but no details on what trouble you have run > > into > > > > > trying to follow those instructions. It's rather hard to provide > > any > > > > > guidance with no clues as to what isn't working. > > > > > > Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

