Apache 2.4 reverse proxy with digest authentication and macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm having a problem configuring Apache 2.4 as a reverse proxy with Digest Authentication. The strange behaviour is that if I activate the reverse proxy directives, the authentication stops working.
For design reasons, I'm using mod_macro. These are my config files:

macro.conf

<Macro RequestedURI $request_uri>
        <Location ~ "^$request_uri">
                AuthName $request_uri
                AuthType Digest
                AuthDigestAlgorithm MD5
                AuthDigestDomain /
                AuthDigestProvider dbd
                AuthDBDUserRealmQuery "SELECT password FROM password WHERE username = %s AND realm = %s"
                Require valid-user

                ProxyPass http://localhost:9000/$request_uri/
                ProxyPassReverse http://localhost:9000/$request_uri/
                Require all granted
        </Location>
</Macro>

000-default.conf

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        ProxyPreserveHost On
        RewriteEngine on

        DBDriver mysql
        DBDParams "host=localhost port=3306 user=myuser pass=mypass dbname=apacheauth"
        DBDMin  2
        DBDKeep 4
        DBDMax  10
        DBDExptime 300

        Use RequestedURI /test
        Use RequestedURI /othertest

</VirtualHost>

Without ProxyPreserveHost, RewriteEngine, ProxyPass and ProxyPassReverse, the authentication works perfectly.
Any hint?

Thanks in advance

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux