views:

30

answers:

1

I'm a complete newbie to Django. I've been trying to get it working on my Ubuntu server.

everytime someone my server, it redirects to the "Congratulations on your first Django-powered page." It completely ignores the index.html file in the www directory. Why is that? Is there a away to make it so that it only goes to the django page when I goto a subdomain /testproject instead?

here is what I got

python version: 2.5.2 Django version 1.2 b1

I'm using mod_python. here is my apache http.conf file

MaxRequestsPerChild 1

<location "/">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE testproj1.settings
    PythonPath "['/root/django/django_projects'] + sys.path"
    PythonDebug On
</location>

<location "/admin_media">
   SetHandler None
</location>

<location "/media">
   SetHandler None
</location>

<LocationMatch "\.(jpg|gif|png)$">
    SetHandler None
</LocationMatch>


   SetHandler None

Thanks!

+1  A: 

"It completely ignores the index.html file in the www directory. Why is that?"

Because you installed django and django takes over from that point. You should probably change the <Location> path to "testproject" instead of "/" as obviously the latter means root/homepage. Though I'm not sure this will quite workout properly because I'm not sure it will take over the entire testproject directory like it would to the root, I could be wrong.

If you have access to, you can instead setup a subdomain as it's probably not feasible to set it up in /testproject/.

meder
ah, thanks! i see it now...
colorfulgrayscale