Opened 16 years ago

Closed 16 years ago

#5084 closed (fixed) not working under apache

Reported by: danf@… Owned by: Malcolm Tredinnick
Component: HTTP handling Version: dev
Severity: Keywords: apache
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Hi all,

Been looking hard for an explanation on this. Can't seem too see what is wrong, looks ok.
Seems to work fine under runserver, but when I use apache, I just get this error. I am going to http://dfcbu001s/mysite/polls/ (internal server)
From what I can read, it is not making any sense?



Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order: 

The current URL, /mysite/polls/, didn't match any of these.

httpd.conf ->

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

from django.conf.urls.defaults import *

urlpatterns = patterns('mysite.polls.views',
    (r'^polls/$', 'index'),
    (r'^polls/(?P<poll_id>\d+)/$', 'detail'),
    (r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
    (r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),

Change History (1)

comment:1 Changed 16 years ago by danf@…

Resolution: fixed
Status: newclosed

Fixed it. Read the docs closer. Apache needs mysite/ included before each url. Sorry

Note: See TracTickets for help on using tickets.
Back to Top