I'm having a little issue with my Apache 2.2.15 Server.
I'm running a Django app on top of it with mod_wsgi. I activated WSGIPassAuthorization On
, which made the Basic auth working well. But I recently implemented OAuth2.0 to secure my API (Implicit Grant), and I think Apache won't let it pass since it is of the form "Authorization: Bearer token". The "Bearer" is the issue I guess, though I don't know how to avoid that.
I tried :
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
In the httpd.conf, .htaccess (after setting AllowOverride All
), and in my vhost. Nothing to do, doesn't work.
I've crawled the Internet all day long, and didn't find anything but those two solutions.
Thank you in advance !
EDIT:
OS : RedHatEL6.4
Apache : 2.2.15
Django: 1.6.6 w/ django-oauth-toolkit
Python: 2.7.8
apachectl restart
andapachectl stop; apachectl start
, didn't solve the issue :/.service httpd restart
to restart apache properly on a RH/CentOS server. This could be causing you issues. ALSO I would not make these changes at all to http.conf as this is the main configuration file for apache - NOT the configuration file for your website. You want to edit things in/etc/httpd/conf.d/yourSite.conf
so I would suggest looking there and undoing any changes you did to the default apache configuration.service httpd restart
, didn't solve the issue, but it's good to know for the future. I will take care modifying only mysite.conf from now on, and thank you for the help and the link to the tutorial !