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
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