Use nginx to return a scraped copy of another site

Tony Mobily tonymobily at gmail.com
Thu Nov 10 12:50:14 UTC 2022


Hi,

I have a web site a.com. I own it and run it, but I don't have access to
the backend. The pages served by a.com are normal plain HTML pages.

I want to run b.com as a duplicate of a.com, with nginx acting as a proxy.
The contents would be identical; however, I would apply some minor
modifications to the HTML. Basically, when somebody requests
b.com/something.html, the server in b.com would make a request to a.com
(asking for /something.html) and then respond with the contents (after
making small modifications, probably using
nginx.org/en/docs/http/ngx_http_sub_module.html#sub_filter).

The a.com site has cookies etc. So, nginx should proxy those too.

Is this possible with nginx? Is there an example configuration I can use as
a starting point?

Merc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20221110/73912fd5/attachment.htm>


More information about the nginx mailing list