'How to send random file from folder

I want to create an nginx file server. The main criteria is sending a random file from defined folder on the machine. It's no matter what is a URL user will trying to open.

How to send random file ? Can I set it up inside nginx.conf ?

Thanks =)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source