I am setting up my Django project to operate on Apache using mod_wsgi. I'm trying to operate Django beneath the directory 'cflow' on apache, but am running into trouble with redirects.
My apache conf looks something similar to this:
... WSGIScriptAlias /cflow "C:Program FilesApache Software FoundationApache2.2wsgidjango.wsgi" <Directory "C:Program FilesApache Software FoundationApache2.2wsgi"> Order allow,deny Allow all </Directory> <Directory "C:Projectsmyprojectsrc"> Order allow,deny Allow all </Directory>
The issue I am running into is when the consumer isn't drenched in, a request /cflow/somepage.html is going to be reidrected to /accounts/login?next=/cflow/somepage.html. This new address isn't beneath the django root (cflow), so apache responds having a 404 Not Found.
My real question is how do i possess the Django redirects planned to become beneath the programs root directory on apache? I.e. how do i result in the /accounts/... page be rather /cflow/accounts/...?
Thank you for any help.
Items to try:
Change current domain to "yourdomain.tld/cflow" within the "sites" framework. It's not hard to do using django admin or dumpdata/loaddata manage.py instructions.
LOGIN_URL = '/cflow/accounts/login/'