by wardguez » 29. August 2018 07:48
Good Morning,
First thank the help.
The goal of my project is:
Have an apache (server1) that serves as a balancer to other servers that can be apache, apache-tomcat, iis, jboss, ... etc.
The problem I have when an application has static content separate from the dynamic content that would serve the apache of server2.
I give an example:
An application is accessed by:
http://domain/app
In the first apache (server1) I have the following configuration:
RewriteRule ^/app$/app/ [R]
JkMount /app/*.jsp cluster_tomcat
JkMount /app/servlet/* cluster_tomcat
ProxyPassMatch ^/app/(. *)\.Jsp !
ProxyPass /app/servlet !
ProxyPass /app/ balancer://server2/app/
ProxyPassReverse /app/ balancer://server2/app/
In the other apache (server2) I have the following configuration:
RewriteRule ^/app$ /app/ [R]
Alias /app "/www/http/app"
The problem is:
If the server2 does not find any file that is described in the DirectoryIndex as it can be: index.html returns a 403 to the user.
The question is:
There would be some way for server2 to return some flag to server1 so that it would continue to evaluate the configuration and look for the dynamic content in cluster_tomcat.
I hope you can help me.
Greetings.