Reverse Proxy question A-& gt; client request B-& gt; proxy server C-& gt; real server request: A-& gt; B-& gt; C, return: c-& gt; B-& gt; how does A implement reverse proxy? Does PHP or http server have this function? For example, nginx. if it is PHP, what is the common method? File_get_contents? Curl? ------ Solution ------------------- reverse proxy problem
A-> client request
B-> proxy server
C-> Real servers
Request: A-> B-> C,
Return value: C-> B->
How do I implement reverse proxy?
Does PHP or http server have this function? For example, nginx.
What is the common method for PHP? File_get_contents? Curl?
------ Solution --------------------
Basically, mature http servers have reverse proxy functions, such as nginx's proxy_pass, which usually processes static files directly by nginx. dynamic php can be transferred to apache for processing. If you need reverse proxy caching, you can try to introduce varnish or squid