2009/10/3 Graham Dumpleton <[email protected]>
>
> I think I may know what you are talking about, but your explanation is
> a bit confusing.
>
> To help understand, post your mod_wsgi configuration from backend.


import os, sys
sys.path.append('/usr/local/django')
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

import django.core.handlers.wsgi

_application = django.core.handlers.wsgi.WSGIHandler()

def application(environ, start_response):
    environ['wsgi.url_scheme'] = environ.get('HTTP_X_URL_SCHEME', 'https')
    return _application(environ, start_response)

#def application(environ, start_response):
#    if environ['wsgi.url_scheme'] == 'https':
#        environ['HTTPS'] = 'on'
#    return _application(environ, start_response)

This configuration set a permanenty the https protocol but I
would like to be able to use https from outside and http inside.

The commented lines is an attempt to achieve that but it didn't work.


> Also give actual examples of full URI that hits front end Apache and
> what full URI then hits the backend. This will make it much clearer
> than an english description.


https://mydomain/mysite/welcome

turns in:

http://mydomain/welcome

If I set a virtualhost  it works as I wouldn't need /mysite/ anymore,
nonetheless  the protocol issue isn't resolved. I would like to know
if there is any chance to make it work without virtualhosts, I mean
just with an alias and directory directory in Apache.


--
Fab

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to