Nginx reverse proxy redirect

Francis Daly francis at daoine.org
Fri Aug 14 13:34:05 UTC 2020


On Thu, Aug 13, 2020 at 05:50:28PM -0400, Dr_tux wrote:

Hi there,

> Thank you very much for this solution. but I have 3 mp3 servers. How can I
> share requests equally? With 301, I can only send a request to a single ip
> address.

With 301, you invite the client to send a request to a single hostname.

You can set DNS up to make that be as many IP addresses as you like,
for example.

If you want within-nginx to issue 301 redirects to different
hostnames, you can use various ways, including perhaps
http://nginx.org/r/split_clients

But you might be happier at that stage, reverse-proxying the
mp3 requests rather than redirecting them -- set an "upstream"
(http://nginx.org/r/upstream) with your three "server"s, and proxy_pass
to the upstream -- that can also take care of some servers not always
being available, if that is a concern here.

Good luck with it,

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list