Hey guys,
In fact,I have two Wordpress instances that are started in two different apache web-servers, as well as each instance has a different IP address.
Image description(show attachement)
I installed Nginx in the first machine (Machine 1).Nginx will play the role of a reverse proxy,he is started on port 80 and apache on port 8080 , the logic that I wanted to apply it this the following :
1.If the user accesses in the first machine ( to M1.com ), Nginx will receive the request and it will redirect the request to apache which is booting on port 8080 in the first machine (Already implemented).
2.If the user enters a url for example (M1.com/m2) , he accesses to wordpress instance which is started in the machine 2 , but the domain name must not be changed , ti must remain on the same domain name (M1.com)
If someone can help me or give me an idea on how I can implement this logic I will be very grateful