0

In the settings for Squid reverse proxy, it gives examples of the kinds of URI it can map. Among these is "www.mydomain.com".

Given this example domain, how would I configure DNS records with my DNS host so that the proxy actually gets a request for "www.mydomain.com" to map? From what I can tell, if I simply have an A record pointing to the IP of the proxy server, clients look up "www.mydomain.com" with the DNS host, which would then resolve to a "x.x.x.x" ip address, which the client would then use to connect to the proxy server. This isn't what I want, because it would break the URI mapping, right? Do I need to set the proxy server as the nameserver for the domain? Is there some other way to do it?

1 Answers1

0

A record pointing to the IP of the proxy server, clients look up "www.mydomain.com" with the DNS host, which would then resolve to a "x.x.x.x" ip address, which the client would then use to connect to the proxy server.

Yes, A and AAAA records for the service name (www.example.net) to the reverse proxy is what you want.

A reverse proxy is "in front of" backends. Internally, it rewrites the request to an internal one, does any middlebox things (load balancing and caching in this case). Then responds to the user agent with the backend's content.

In other words, as the Squid wiki describes reverse proxy:

An accelerator caches incoming requests for outgoing data (i.e., that which you publish to the world). It takes load away from your HTTP server and internal network. You move the server away from port 80 (or whatever your published port is), and substitute the accelerator, which then pulls the HTTP data from the "real" HTTP server (only the accelerator needs to know where the real server is). The outside world sees no difference (apart from an increase in speed, with luck).

John Mahowald
  • 30,009
  • 1
  • 17
  • 32