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

28👍

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

2👍

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]

0👍

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

        ...
                </Files>
        </Directory>

        WSGIPassAuthorization On

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

Leave a comment