Please help to set up a protection for Tomcat app with .htaccess.
I want to use mod_proxy ProxyPass and ProxyPassReverse
My tomcat app: www.example.com:8085
What I want is to make it impossible to access the Tomcat app without going through Apache auth first.
Best Answer
Based on the fact tomcat and apache are on same server (else, you need to setup a firewall in front of tomcat which will accept connections to tomcat only from apache server) and your context is named
app
Configure tomcat to listen only on localhost (edit
server.xml
file)Configure apache for proxy and auth.