Three example nginx locations and the PHP required for mp4 secure_links.
before: https://https://mydomain.com/data/videos/file.mp4
after : https://mydomain.com/data/videos/file.mp4?md5=Vtzs2WCnCqRsE47EH6U6pQ&expires=1617601227
make sure the secret password you use match in both lines below
$remote_addr secretword << in nginx config section