Welcome! Log In Create A New Profile

Advanced

How to make nginx serve only images and nothing else.

Posted by miradev 
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: 78
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready