In theory, this is the solution I copied from another post in order to fix
the missing HTTP_AUTHORIZATION. But I was not successful on it.

I got no problems running the same django project on home PC.


On Mon, Jul 28, 2014 at 10:47 PM, Graham Dumpleton <
[email protected]> wrote:

> So what is:
>
>         RewriteEngine on
>         RewriteCond %{HTTP:Authorization} ^(.*)
>         RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
>
> meant to be trying to achieve.
>
> You should not need to be trying to set HTTP_AUTHORIZATION yourself.
>
> Graham
>
> On 29/07/2014, at 11:40 AM, João Paulo <[email protected]> wrote:
>
> I have a virtual machine running on Amazon EC2. Inside this machine, I
> also have a django application project working as a RESTful back-end to my
> mobile app.
>
> Through a RESTful GET like curl -u [email protected]:potatoes
> https://sfw.com/accounts/login/, I get a status code 401 (wrong username
> or password).
>
> I have understood until know, from all my trials, is that the
> HTTP_AUTHORIZATION is not arriving to the running Django.
>
>
> On Mon, Jul 28, 2014 at 10:29 PM, Graham Dumpleton <
> [email protected]> wrote:
>
>> Sorry, don't understand what you mean by that.
>>
>> When you say 'The application running on AMZ is the responsible for
>> authentication management' are you talking about your Django application,
>> or some separate application independent of Apache, or one somehow
>> integrated with Apache authentication mechanism.
>>
>> Graham
>>
>> On 29/07/2014, at 11:23 AM, João Paulo <[email protected]> wrote:
>>
>> I am using this django as an android mobile backend. The application
>> running on AMZ is the responsible for authentication management, including
>> social login.
>>
>>
>> On Mon, Jul 28, 2014 at 9:55 PM, Graham Dumpleton <
>> [email protected]> wrote:
>>
>>> What exactly are you trying to do?
>>>
>>> Especially, why do you have the following?
>>>
>>>         RewriteEngine on
>>>         RewriteCond %{HTTP:Authorization} ^(.*)
>>>         RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
>>>
>>> And where does the password checking even occur and with which
>>> authentication scheme?
>>>
>>> Right now you have nothing in the Apache configuration such that it is
>>> doing authentication management.
>>>
>>> Are you doing authentication in your Django application?
>>>
>>> Usually people use form based login with Django and not HTTP
>>> authentication, and WSGIPassAuthorization has got nothing to do with Django
>>> form based authentication.
>>>
>>> Graham
>>>
>>> On 29/07/2014, at 5:40 AM, Joao Paulo Fernandes Ventura <
>>> [email protected]> wrote:
>>>
>>> Hello,
>>>
>>> I am having a similar problem with a Django application running at
>>> Amazon EC2 (I also posted a question at Stack Overflow
>>> <http://stackoverflow.com/questions/24664082/missing-http-authorization-at-amazon-ec2-django-instance>
>>> ).
>>>
>>> First I would like to know which of the following files should contain
>>> the rewrite rule option:
>>>
>>>    - site-full.conf
>>>    - site-simple.conf
>>>    - vhosts.conf
>>>    - httpd.conf
>>>
>>> And second, if this is the correct manner of declare the rewrite rule on
>>> site-full.conf and site-simple.conf:
>>>
>>>     WSGIScriptAlias / /home/sfw/%(namespace)s/appengine/wsgi.py
>>>     WSGIPassAuthorization On
>>>
>>>     <Directory "/home/sfw/%(namespace)s/">
>>>         AllowOverride All
>>>         Require all granted
>>>
>>>         RewriteEngine on        RewriteCond %{HTTP:Authorization} ^(.*)
>>>         RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
>>>
>>>         <Files wsgi.py>
>>>             SetEnvIfNoCase Host %(full_host_regex)s|%(naked_host_regex)s
>>> VALID_HOST
>>>             Order Deny,Allow
>>>             Deny from All
>>>             Allow from env=VALID_HOST
>>>         </Files>
>>>     </Directory>
>>>
>>> Thank you a lot for your help :-)
>>>
>>> On Wednesday, December 23, 2009 8:27:49 AM UTC-2, Jumpfroggy wrote:
>>>>
>>>> Yeah, just a big miss on my part.  Everything's working now, thanks
>>>> for the tips.  Definitely got me going in the right direction.
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "modwsgi" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/modwsgi.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "modwsgi" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/modwsgi.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Joao Paulo Fernandes Ventura
>> Computer Engineer - University of Campinas
>> http://br.linkedin.com/in/talktojp
>>
>> Computer games don't affect kids.
>> I mean if Pac-Man affected us as kids, we'd all
>> be running around darkened rooms, munching magic
>> pills and listening to repetitive electronic music.
>>
>> Kristian Wilson, Nintendo, Inc. 1989.
>> =============================================
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "modwsgi" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/modwsgi.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "modwsgi" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/modwsgi.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Joao Paulo Fernandes Ventura
> Computer Engineer - University of Campinas
> http://br.linkedin.com/in/talktojp
>
> Computer games don't affect kids.
> I mean if Pac-Man affected us as kids, we'd all
> be running around darkened rooms, munching magic
> pills and listening to repetitive electronic music.
>
> Kristian Wilson, Nintendo, Inc. 1989.
> =============================================
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/d/optout.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Joao Paulo Fernandes Ventura
Computer Engineer - University of Campinas
http://br.linkedin.com/in/talktojp

Computer games don't affect kids.
I mean if Pac-Man affected us as kids, we'd all
be running around darkened rooms, munching magic
pills and listening to repetitive electronic music.

Kristian Wilson, Nintendo, Inc. 1989.
=============================================

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to