问题
I want to replace Apache's httpd basic authentication(pop up based) with a normal form-based login page.
Is it possible to do that?
回答1:
I found the answer!!! Hope it may help some one.
Apache httpd server internally supports mod_auth_form, using that we can get credentials from user by showing form-based login page.
how to use mod_auth_form - https://httpd.apache.org/docs/2.4/mod/mod_auth_form.html
Way to preserve the request uri:
Connect via AJP protocol.
Basic flow - Httpd asks for user credentials & authenticates the user. If valid user found, then it will share remote user details with Tomcat via AJP port. This will preserve the incoming URI request to httpd.
来源:https://stackoverflow.com/questions/45356046/apache-httpd-basic-auth-bypass-popup-with-html-jsp-page