Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#2035 closed defect (invalid)

All perfect with Developer mode, but it not work in production using Apache

Reported by: anonymous Owned by: manuparra@…
Component: Core (Other) Version: 0.91
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Using developer with "python manage.py runserver 192.168.1.100:8001" works perfectly and very fine, but now i have to work in stable mode (production) and i use APACHE2 + Mod_python and i have configured apache2.conf with this (and always i have "404 PAGE NOT FOUND"):

<Location /myproject/>

SetHandler mod_python
PythonHandler django.core.handlers.modpython
PythonPath "home/mparra/desarrollo/django/ + sys.path"
SetEnv DJANGO_SETTINGS_MODULE myproject.settings
PythonDebug On

</Location>


Path I have:
/home/mparra/desarrollo/django/

/myproject

/urls.py
/polls
/settings.py
/ ...

When i put address: http://192.168.1.100/myproject/polls/
i have the next:

Page not found (404)
Request Method: GET
Request URL: http://192.168.1.100/myproject/polls/

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

  1. polls/$
  2. polls/(\d+)/$
  3. polls/(\d+)/results/$
  4. polls/(\d+)/vote/$

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


My urls.py is:

from django.conf.urls.defaults import *

urlpatterns = patterns(,

(r'polls/$', 'myproject.polls.views.index'),
(r'
polls/(\d+)/$', 'myproject.polls.views.detail'),
(r'polls/(\d+)/results/$', 'myproject.polls.views.results'),
(r'
polls/(\d+)/vote/$', 'myproject.polls.views.vote'),

)

Thanks, i wait your response!! Thanks

Change History (1)

comment:1 by James Bennett, 18 years ago

Resolution: invalid
Status: newclosed

Requests for help should be sent to the Django users mailing list: http://groups.google.com/group/django-users/

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