Migrating from Lighttpd/Apache combo: extra path on static files

Pedro Melo melo at simplicidade.org
Fri Feb 11 19:03:39 MSK 2011


Hi,

I'm migrating a setup for a friend, and hit a snag, I can't seem to
find the proper way to do this on nginx.

Assume a directory /my/files/ with a.gif inside. He is using:

 location /files {
   alias /my/files;
 }

but then he is requesting /files/a.gif/extra.jpg

With the previous setup, the server would send a.git and ignore the
extra.jpg. With nginx I get a 404.

Any way to convince nginx to walk to path and serve the first file
found, or do I have to trick him with rewrite rules?

Thanks,
-- 
Pedro Melo
http://www.simplicidade.org/
xmpp:melo at simplicidade.org
mailto:melo at simplicidade.org



More information about the nginx mailing list