Score:0

A web server that takes contents from another one, and serves it with slightly modified HTML

co flag

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.

co flag
Mr. Close the question, where should I post it?
Richard Smith avatar
jp flag
Nginx has `sub_filter`, see: http://nginx.org/en/docs/http/ngx_http_sub_module.html#sub_filter
co flag
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?
diya avatar
la flag
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
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.