Problem Configuration Apache

Alles, was den Apache betrifft, kann hier besprochen werden.

Problem Configuration Apache

Postby wardguez » 28. August 2018 11:41

Good morning,

I have two Apaches with different configuration on the directoryIndex.
If when the request arrives at apache1 I want it to go to look for the content of apache2 and if it does not have to return it to apache1 and vice versa.

Could you help me?

Greetings.
wardguez
 
Posts: 3
Joined: 28. August 2018 11:37
XAMPP version: 7.0.31
Operating System: Centos

Re: Problem Configuration Apache

Postby Nobbie » 28. August 2018 16:08

1) You cannot run two Apaches at the same IP/Port on a PC.

2) You cannot "look" into the configuration of a foreign Apache. You only can run HTTP Requests.

I think, this is conceptually very strange, maybe you should tell us the goal of your project, there surely is a better solution for your needs. Its never a good idea to run more than one Apache on a PC. Instead use VirtualHosts etc. and a proper configuration of one Apache.

And how to you define "does not have (content"? A request to a server does not know "not have". Either it returns a user contents or it returns content from Apache (error messages etc.). It returns contents in ANY case (or it is unreachable and times out after a proper amount of time). How should Apache1 decide whether the contents of Apache2 is "unwanted" or "wanted" contents?
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Problem Configuration Apache

Postby 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.
wardguez
 
Posts: 3
Joined: 28. August 2018 11:37
XAMPP version: 7.0.31
Operating System: Centos

Re: Problem Configuration Apache

Postby wardguez » 29. August 2018 09:49

I explain myself better
I have an apache httpd reverse-proxy server, which I have called "Server1". And several Backend servers (Apache, Apache-Tomcat, IIS, JBOSS, etc ...).

The problem is if in the Apache Backend it gives a 403 because it does not find the file index.jsp the Apache httpd reverse-proxy does not continue evaluating more configuration lines to find the redirection towards the Apache-Tomcat.

Can you think of any way to act?

Greetings again.
wardguez
 
Posts: 3
Joined: 28. August 2018 11:37
XAMPP version: 7.0.31
Operating System: Centos

Re: Problem Configuration Apache

Postby Nobbie » 29. August 2018 12:30

No, i have no idea. This is beyond the scope of this forum, we try to help people to solve configuration issues with Xampp/Apache.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04


Return to Apache

Who is online

Users browsing this forum: No registered users and 19 guests