I want to use NGINX as a director where the following logic would take place:
+ Request for an asset comes from the web
++ Taking the path of the file - check if this file is already under my s3 bucket -http://$s3_bucket/$url_full
+++ If file exists then redirect the request to "http://$s3_bucket/$url_full"
+++ If file does not exist then serve it directly from the local drive and trigger a shell command.
Thank you for any help on this.
+ Request for an asset comes from the web
++ Taking the path of the file - check if this file is already under my s3 bucket -http://$s3_bucket/$url_full
+++ If file exists then redirect the request to "http://$s3_bucket/$url_full"
+++ If file does not exist then serve it directly from the local drive and trigger a shell command.
Thank you for any help on this.