2009/10/3 Graham Dumpleton <graham.dumple...@gmail.com>:
> You still didn't post your mod_wsgi configuration. You only posted
> your WSGI script file. I am talking about the WSGIScriptAlias you are
> using in the Apache configuration files and any associated directives.
>

sorry! This is my current configuration :

# Activate virtual hosts
NameVirtualHost *:80

<VirtualHost *:80>
    ServerName   django.test
    ServerAlias  django.test
    UseCanonicalName Off
    ServerAdmin  "webmas...@mydomain"
    DocumentRoot /home/django/apache
    ErrorLog logs/django-error_log
    RewriteLog logs/django-rewrite_log


    Alias /media/ /home/django/apache/mydjangoproject/media/


    <Directory /home/django/apache/mydjangoproject/media>
         Order deny,allow
         Allow from all
    </Directory>

    WSGIScriptAlias /mydjangoproject /home/django/apache/wsgi/django.wsgi
    SetEnvIf X-Url-Scheme https HTTPS=1

    <Directory /home/django/apache/wsgi>
         Order deny,allow
         Deny from All
         Allow from All
    </Directory>

</VirtualHost>




> try using something like the following:
>
>    <Location /dirname>
>        SSLVerifyClient      none
>        SSLOptions           +FakeBasicAuth
>        SSLRequireSSL
>        AuthName             "stuff name"
>        AuthType             Basic
>        AuthUserFile         /etc/httpd/djangoserver.passwd
>        require              valid-user
>
>        RequestHeader set X-Url-Scheme https
>    </Location>
>
>    ProxyPass /dirname http://django.test/dirname
>    ProxyPassReverse /dirname http://django.test/dirname
>
> Then in backend Apache web server have:
>
>  WSGIScriptAlias /dirname /some/path/django.wsgi
>  SetEnvIf X-Url-Scheme https HTTPS=1
>
> Delete the attempt to set wsgi.url_scheme in the WSGI script file, as
> setting HTTPS in Apache configuration using SetEnvIf achieves same
> thing as mod_wsgi sees HTTPS and will allow that to override
> wsgi.url_scheme.

https requests are now working well,

But I'm still facing the URL issue when using a subdirectory  on
WSGIScriptAlias directive and https requests.

by the way:  dirname has the same name of mydjangoproject

e.g:

 https://proxydomain/dirname/accounts/login/

became :

 https://proxydomain/accounts/login/

-- 
Fab

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to