Hi
I have deployed my application on Apache using WSGI, using
WSGIScriptAlias / /var/www/site/django.wsgi. Everything looks very
good. My actual application lives at http://<host>/application. So
with the setup above when I browse to http://<host/ i get the normal
django 404 page. I get this even if I add a .htaccess file ro
redirect / to /application. I can understand why this happening, it
because the wsgi script is rooted at / so the .htaccess file is never
utilized. If I change the WSGIScript alias setting to be
WSGIScriptAlias /application /var/www/site/django.wsgi. Then
the .htaccess file gets invoked but django stops working.
So if anybody has any idea what I'm doing wrong above that would be
appreciated.
In the meantime what would also work is to add an entry in the main
application's urls.py to redirect / to /application. But I don't know
how to do this. So any help would be appreciated.
Thanks
Your question is a little bit confusing. Django's URLconfs don't really care about applications, except in as much as can choose to group a set of urls into an application's own urls.py if you want to. There's nothing that forces you to route all requests to application `foo` to /foo/whatever: if you want `foo` to be responsible for answering requests at `/`, then just configure it that way:
(r'^$', 'foo.views.main')
or include the whole sub urls.py at the root url:
(r'^', include('foo.urls'))
--
DR.
-- You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/pM8_XhF1UAcJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment