[Fixed]-Where do I put "WSGIPassAuthorization On"?


Put it at same place as WSGIScriptAlias and it should work fine.


Connect to your EC2, go to etc/httpd/conf.d folder and open wsgi.conf file. Insert the code within VirtualHost DOM:

WSGIPassAuthorization On

RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]


in folder /etc/apache2/sites-available open your config file, for example mySite.conf and then add WSGIPassAuthorization On to it as follows:


        WSGIPassAuthorization On

        WSGIScriptAlias / /home/X/wsgi.py
        WSGIDaemonProcess sepanta_dev python-path=/home/X python-home=/home/X/venv

Leave a comment