I am trying to run Tomcat server with Apache HTTP server as front end, which I am able to configure successfully using mod_proxy plugin.
I am able to access the sample application provided in Tomcat like this: http://localhost:8080/examples/jsp/ As well as this: http://localhost/jsp
The only difference (as you know already) is the first one is served directly from Tomcat and the second one by Apache. I would like to prevent a direct web requests to tomcat server.
For ex: http://localhost:8080/examples/jsp/ should not work but this one should http://localhost/jsp
The below is the resources I found close to this problem statement. One of the post suggests to use nginx - which I haven't tried yet and not sure if I should definitely go for it; but is there a simpler way to do this?
It would be great if the members could help on this.
Update after Phil's comment: I don't want users to access contents of Tomcat directly, but only through Apache. Infact, I don't want users to be aware that there is an alternate way to access contents rather than Apache. I am not using any struts or spring MVC for now. But I am ready to use if this would solve this issue.