Opened 13 years ago
Last modified 13 years ago
#17351 closed New feature
Accessing Django project admin using the URL http//localhost/projectadmin in apache and mod_wsgi — at Initial Version
Reported by: | 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
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@…