I use uwsgi to provide access to the structure of subdirectories with "flat" URLs - for example, the file /var/files/f/foocan be accessed via http://site/files/foo. I accomplished this with help --route "^/files/(.)(.*)\$ static:/var/files/\$1/\$1\$2".
This setting works fine if the required files exist, but the server closes the connection and logs an HTTP 500 error when someone requests a nonexistent file. Can he be set to return something meaningful?
I tried to add --route "^/files/.* return:404", but nothing has changed.
source
share