开发者

Setting up a proxy server

So I have a server set up (LAMP) server, this proxy has access to the internal network and I need to give the outside world access to this proxy in order to perform tasks.

For example, you should be able to call that proxy with a POST request with the right parameters and 开发者_Go百科the proxy should return the status of that post. Now let's say that post is being done in a php script called (something.php) in the main folder of that proxy. How do I give access to the outside world to access that proxy?

I hope this is clear, sorry I couldn't make it much clearer but if you have any further questions to clarify please let me know!


To setup a reverse proxy with Apache, you have to use mod_proxy together with mod_proxy_http, since you want to proxy HTTP requests. The manual is here.

A basic configuration straight from the manual is:

ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /foo http://foo.example.com/bar
ProxyPassReverse /foo http://foo.example.com/bar

Now when the proxy server receives a request to /foo/whatever, it will itself download http://foo.example.com/bar/whatever and upload it back to the client.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜