I have the following Apache2 proxy directives in my VirtualHost. Which I want to only match when the admin pages are requested so that one time passwords are prompted for. All other proxy requests should be handled by the ProxyPass and ProxyPassReverse without interference.
ProxyPass / http://localhost:32768/ nocanon
ProxyPassReverse / http://localhost:32768/
<Proxy http://server/admin >
AuthType basic
AuthName "Enter your authenticator code as the password"
AuthBasicProvider OTP
Require valid-user
OTPAuthUsersFile /etc/apache2/otp/otp.users
</Proxy>
But, I can only get <Proxy * >
to work, which intercepts all requests. Where am I going wrong?
Best Answer
I bit of googlefu led me to this book.
I configured the route as follows:
Works just how I want now.