On Oct 15, 5:14 am, Jani Tiainen <rede...@gmail.com> wrote:
> Chris Withers kirjoitti:
> > Hi All,
>
> > I need to host my django project from /some/folder in my apache instance.
>
> > I have the following:
>
> > WSGIScriptAlias /some/folder /path/to/django.wsgi
>
> > Does this now mean I have to prefix all my entries in urls.py with
> > /some/folder?
>
> > I hope not, but give that going to:
>
> >http://myserver/some/folder
>
> > ...gives me a 404 unless I do, I'm not hopeful.
>
> > What am I doing wrong?
>
> "nothing".
>
> Term is called "suburl deployment" and I've done it (for testing purposes).
>
> Apache config:
>
> RewriteEngine On
>
> #add missing trailing slash if needed
> RewriteRule ^/<suburl>$ /<suburl>/ [R]
This rewrite rule should not be required for things to work.
Graham
> #WSGI alias[[BR]]
> WSGIScriptAlias /<suburl> absolute_path_to_wsgi_file.wsgi[[BR]]
>
> And if you're using authentication in your app you must provided full
> absolutely URL to login page, I've done it settings.py:
>
> LOGIN_URL='/<suburl>/login/'
>
> And that's it. Of course you have to keep all your apps using hardcoded
> urls but use reverse url finding always.
>
> --
> Jani Tiainen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---