Elgg - Missing authorization headers on Apache

Hello everyone,

I am working on a custom plugin that requires "Apache authentication headers to be passed through by default".  So I am using Apache 2 with mod_php that allow s "Apache authentication headers to be passed through by default".

I really don't know what is going wrong but the "Apache authentication headers are not passed through by default" on my elgg 3.x site.

I have read a lot of documents on this topic and some of them ask me to add additional rules in the .htaccess file.

Some of those roles are the following.

1- .htaccess

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

2- .htaccess

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

3- .htaccess or apache virtual host

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

4- .htaccess or apache virtual host

SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0

5- .htaccess

RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

 

None of the above settings are not working. "Apache authentication headers are not passed through by default" on my elgg 3.x site.

Could someone help me with this issue ? My app is hosted under Apache/2.4.29 (Ubuntu) .

Here is my virtualHost configuration

<IfModule mod_ssl.c>
        <VirtualHost _default_:443>
                ServerAdmin webmaster@localhost
                ServerName piwal-elgg.com
                DocumentRoot /xxxx/xxxx/xxxx/WEB/piwal

                ErrorLog ${APACHE_LOG_DIR}/error.log
                CustomLog ${APACHE_LOG_DIR}/access.log combined


                SSLEngine on

                SSLCertificateFile      /xxx/xxx/certs/ssl-cert-snakeoil.pem
                SSLCertificateKeyFile   /xxx/xxx/private/ssl-cert-snakeoil.key

                <Directory /xxx/xxx/xxx/WEB/piwal>
                        Options Indexes FollowSymLinks

                        AllowOverride All
                        Require all granted

                </Directory>

        </VirtualHost>
</IfModule>

 

 

 

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking