Code

Opened 8 years ago

Closed 8 years ago

Last modified 8 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: UI/UX:

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

Attachments (0)

Change History (1)

comment:1 Changed 8 years ago by ubernostrum

  • Resolution set to invalid
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.