Opened 13 years ago

Closed 13 years ago

#17351 closed New feature (invalid)

Accessing Django project admin using the URL http//localhost/projectadmin in apache and mod_wsgi — at Version 1

Reported by: rameshsahoo11@… Owned by: Ramesh Sahoo
Component: HTTP handling Version: 1.2
Severity: Normal Keywords: django custom admin url
Cc: rameshsahoo11@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: yes

Description (last modified by Karen Tracey)

HI All,

I am facing issue with configuring django admin URL in apache with mod_wsgi for my live projects which I migrated from mod_pyth to mod_wsgi.

Eriler I was using django projects in apache with mod_python configuration. I was able to access the project admin interface using the URL http://localhost/projectadmin. Following are my apache configuration.

For apache configuration, I use the following

<Location "/project/">
      SetHandler python-program
      PythonHandler django.core.handlers.modpython
      SetEnv DJANGO_SETTINGS_MODULE project.settings
      PythonPath "['/var/opt'] + sys.path"
      PythonDebug Off
      PythonInterpreter project
</Location>


<Location "/projectadmin/">
      SetHandler python-program
      PythonHandler django.core.handlers.modpython
      SetEnv DJANGO_SETTINGS_MODULE project.settings
      PythonPath "['/var/opt'] + sys.path"
      PythonDebug Off
      PythonInterpreter projectadmin
</Location>

The project urls.py entries are as follows.

from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',

# Uncomment this for admin:
     (r'^projectadmin/doc/', include('django.contrib.admindocs.urls')),
     (r'^projectadmin/(.*)',admin.site.root),

The same urls I want to use in apache with mod_wsgi configuration. The following are my apache and project urls.py example configuration.

WSGIScriptAlias /project /var/opt/project/apache/project.wsgi

urls.py

from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',

# Uncomment this for admin:
     (r'^projectadmin/doc/', include('django.contrib.admindocs.urls')),
     (r'^admin/(.*)',admin.site.root),

Please provide a solution for the wsgi configuration.

Regards,

Ramesh S.
Email ID: rameshsahoo11@…

Change History (1)

comment:1 by Karen Tracey, 13 years ago

Description: modified (diff)
Resolution: invalid
Status: newclosed

Fixed formatting. Please use WikiFormatting and the preview button before posting. This sounds like a user support question, not a bug in Django. Please see TicketClosingReasons/UseSupportChannels

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