I distribute the file using nginx (a separate subdomain other than the main site) in the config set the limit using limit_conn equal to unity. From the documentation it is clear that in case of subsequent file download requests the server returns 503 error. Please tell me how to make it beautiful so that the user would send to the site page with information that the limit was reached and the code page 200.
There is an idea to add limit_conn_status with an error (307, for example) and redirect the user to the processing where necessary. But I'm not sure about the adequacy of the idea.