0

I have a web site a.com (please note: I own and run it). I want to be able to run a slightly modified version of it on b.com . 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).

Is there software that will do that already? Can I use squid for it? Or nginx? If they do the job, would they allow me to modify the HTML served?

The a.com site has cookies etc. So, whichever system would need to preserve cookies, headers, etc.

Merc
  • 789
  • 1
  • 6
  • 16
  • Mr. Close the question, where should I post it? – Merc Nov 10 '22 at 11:47
  • Nginx has `sub_filter`, see: http://nginx.org/en/docs/http/ngx_http_sub_module.html#sub_filter – Richard Smith Nov 10 '22 at 12:39
  • But... can I do what I want with nginx? That is, when viewing b.com, nginx actually takes it from a.com and serves it to the client, which has no idea it's just been scraped from a.com? – Merc Nov 10 '22 at 12:44
  • The technical name for the process/functionality is a ***"reverse proxy"*** there are many (open source) web servers that provide support for that, as well as more dedicated and specialised software and appliances. See for example https://en.wikipedia.org/wiki/Category:Reverse_proxy for an overview and https://serverfault.com/questions/932628 for some code examples specific to nginx – diya Nov 10 '22 at 14:28

0 Answers0