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.
Case :
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.
Next,
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
Example
<VirtualHost *:80>
ServerName test.app
<IfModule mod_proxy.c>
ProxyRequests On
ProxyVia On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://www.google.com
ProxyPassReverse / http://www.google.com
LogLevel debug
</IfModule>
</VirtualHost>
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.
Template
<VirtualHost *:80>
ServerName [servername]
<IfModule mod_proxy.c>
ProxyRequests On
ProxyVia On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass [Path-From-Requsting-Server] [URL-Request-Need-To-Call-On-Resource-Server]
ProxyPassReverse [Path-From-Requsting-Server] [URL-Request-Need-To-Call-On-Resource-Server]
LogLevel debug
</IfModule>
</VirtualHost>
Much obliged to you for sharing a particularly Magnificent post here. I discovered this blog extremely helpful for future references. continue to impart such instructive sites to us.Best Dedicated Proxy Service In USA
ReplyDeleteReally glad to say, your post is very interesting to read. I never stop myself to say anything about it. You are doing a great job. Thank you for sharing this blog here. recaptcha proxy
ReplyDelete