Hi all,

I'm trying to deploy my app under a non-root url (http://myserver.com/
myapp), using apache and wsgi, but I'm having troubles with the
configuration of the authentication framework.

When trying to log in, I get redirected to the url I defined for that
in the settings file (LOGIN_URL), but that URL doesn't have the "/
myapp" prefix, even though I defined the proper prefix in the apache
configuration file (WSGIScriptAlias /myapp .....)

As far as I understand, I must use absolute URLs for both the
LOGIN_URL and LOGIN_REDIRECT_URL settings. However, that seems to
yield problems when deploying to a non-root url.

I tried using reverse() in the settings file, but that doesn't work.

I read the mod_wsgi wiki, in the section for using it with django, and
it mostly says that deploying with non-root urls should work out of
the box with django 1.0+ (django 1.2 here).

I'm kind of lost with this, and I have a few questions:

What should I do? change the LOGIN_*_URL settings somehow? to what
value should I change them? I checked some pinax code lying around
here, and I see that it simply prepends the to these settings the url
under which the app is deployed. I'd rather avoid that path as that
would imply a few extra hacks to get the development and production
servers working properly.

Maybe is there something wrong with the apache config or the wsgi
file? I copy the contents of both of them below.

Thanks,


WSGI File

import os
import sys
sys.path.append("/srv/cargue_archivos_1.0")

os.environ['DJANGO_SETTINGS_MODULE'] = 'fu.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()



Apache Config File


WSGIScriptAlias /cargue_comedores /srv/cargue_archivos_1.0/fu/apache/
django.wsgi
<Directory /srv/cargue_archivos_1.0/fu/apache>
Order allow,deny
Allow from all
</Directory>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.

Reply via email to