Opened 14 years ago

Closed 14 years ago

#13601 closed (invalid)

Django Admin Page not found

Reported by: morfeokmg Owned by: nobody
Component: contrib.admin Version: 1.1
Severity: Keywords: ^admin/
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi, i configure my django install with Oracle and Apache 2.2, activate admin option but fail, error:

Page not found (404)
Request Method: 	GET
Request URL: 	http://srvlnx01.servehttp.com/linuxFriend/

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

   1. ^admin/

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

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.

My settings :

...
ROOT_URLCONF = 'linuxFriend.urls'

TEMPLATE_DIRS = (
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.admin',
...

and my file urls.py

from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Example:
    # (r'^linuxFriend/', include('linuxFriend.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),

I have modified files:

/etc/apache2/httpd.conf.local

Content:

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

and file /etc/sysconfig/apache2 add next lines:

#APACHE_CONF_INCLUDE_FILES=""
APACHE_CONF_INCLUDE_FILES="/etc/apache2/httpd.conf.local"

help me, pls.
Tanks!.

Change History (1)

comment:1 by Karen Tracey, 14 years ago

Resolution: invalid
Status: newclosed

Trac is for reporting bugs in Django, not support questions. Please ask questions like this in django-users group or on #django IRC. You have commented out the django.root option your config needs, which leads me to think you ran into some other problem when that was properly set. If so please follow up on one of the user support channels, not here. Alternatively you might consider using mod_wsgi instead of mod_python; mod_wsgi is a much better alternative, and easier to configure properly.

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