Forward Proxy Using Apache
There are many scenarios where we need some kind of proxy. We will consider one scenario from all where we need to use the forward proxy.
Suppose there is a service which is available for certain IP/ IPs only (These are mostly secured services). In this case, you have to forward the service requests through that specific.
Take an example :
Entities playing role,
- Hosting App On Google App Engine ( Dynamic IP)
- White Listed Server ( X.X.X.X )
- Resource Server ( Y.Y.Y.Y )
So if we want to request Resource Server (Y.Y.Y.Y) we have to send it to the way Server feel like they have come from White Listed Server IP (X.X.X.X).
Here Proxy server comes in the play.
Proxy server takes the request and forwards it as they are initiated by itself.
So what we have to do is we have to put a proxy server at White Listed Server.
Our App will send request through the white listed server instead of directly requesting the Resource server
To setup Proxy server in apache
create a new virtual host file
In the upper example. Every Request made to test.app server on port 80 with root URL it will be forwarded to URL www.google.com.