My server side is nginx-1.2.4 + php-5.3.17. I have a php script to fetch another site's content via curl, which gzip isn't enabled. While nginx has gzip on. So the data flow looks like:
plain/html plain/html gzipped
xxx site's html ==============> php(curl) ==============> nginx ============> user's browser
But now, I want to enable gzip of php' curl for the sake of speedup a little bit. Then, the procedure:
gzipped plain/html gzipped
xxx site's html ===========> php(curl) ==============> nginx ============> user's browser
Because php's curl will automatically uncompress gzipped html to plain html, so when the html is passed to nginx, nginx will do the compression again.
What I am thinking is, can php keeps gzipped data and forward it to nginx, and no need for nginx to compress one more time. The expected procedure looks like:
gzipped gzipped gzipped
xxx site's html ===========> php(curl) ===========> nginx ===========> user's browser
Best regards.
proxy_pass
? – VBartproxy_store
can store the data for further use. – VBart