httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ajay Garg <ajaygargn...@gmail.com>
Subject [users@httpd] Authentication BEFORE proxying
Date Sat, 08 Apr 2017 06:23:07 GMT
Hi All.

If I setup the following in a virtual-host,

####################################################################################
Listen 9001
<VirtualHost *:9001>
        DocumentRoot /var/www/html

        <Directory "/var/www/html">
            AuthType Basic
            AuthName "Restricted Content"
            AuthUserFile /home/f5a6b457ba0d416cb4847bb3c4c6e6b6/.htpasswd
            Require valid-user
        </Directory>

        ProxyPass / http://127.0.0.1:9000/
        ProxyPassReverse / http://127.0.0.1:9000/

</VirtualHost>
#####################################################################################


and I type http://1.2.3.4:9001 in the browser, I get taken directly to the
proxy-address, without the auth-dialog popping up.

If however, I remove the "ProxyPass" and "ProxyPassReverse" directives, and
I type the same http://1.2.3.4:9001 in the broswer, the auth-dialog pops up
as expected.


Is there a way to first let the auth-dialog pop-up, and only if credentials
are correct, to move to the proxy-address?

Looking forward to some help.


Thanks and Regards,
Ajay

Mime
View raw message