How to make nginx serve only images and nothing else.
October 30, 2009 11:15AM
I need to build a config that serves only image files. Any other request is a 404 (or other error, or maybe a 1 pixel png).

Presumably actually checking the files themselves is not possible (certainly not fast), so it would have to be based on file extension? Assuming this to be true, then I will have a whitelist of suffixes. I'd like to make enforce the headers on these.

My google-fu is not helping me today, any pointers?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 106
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready