Welcome! Log In Create A New Profile


Nginx as a Reverse Proxy for Apache

Posted by mohamedfadlaoui 
Nginx as a Reverse Proxy for Apache
August 02, 2017 12:29PM
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
open | download - SchemaWWP.png (12.7 KB)
Re: Nginx as a Reverse Proxy for Apache
June 07, 2018 02:54AM
What is the sense to use nginx as frontend for apache?
You can use it directly with php-fpm.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 80
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready