Contents of `/etc/apache2/site-confs/devwiki/50-thumb-php-on-404.conf`:
```
RewriteEngine On

# call thumb.php for thumb images not on disk
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/[^/]*([0-9]+)px-.*$ /w/thumb_handler.php [PT,QSA,B]


# call thumb.php for thumb archive images not on disk
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/[^/]*([0-9]+)px-.*$ /w/thumb_handler.php [PT,QSA,B]
```

Contents of `/etc/apache2/site-confs/devwiki/50-devwiki-images.conf`:
```
# vim: filetype=apache sts=4 sw=4 autoindent
#
# This file is managed by Puppet.
#
<Directory /srv/images>
    Require all granted
    Header set Access-Control-Allow-Origin "*"
</Directory>

Alias /images /srv/images
```

Apache log with `LogLevel alert rewrite:trace6`:
```
Jul  7 23:56:57 mediawiki-vagrant apache2[6545]: [rewrite:trace2] [pid 6545] mod_rewrite.c(468): [client 10.0.2.2:56986] 10.0.2.2 - - [127.0.0.1/sid#7f720dfb0bb8][rid#7f720decc0a0/initial] init rewrite engine with requested uri /images/thumb/b/b0/Sunrise_over_fishing_boats_in_Kerala.jpg/800px-Sunrise_over_fishing_boats_in_Kerala.jpg, referer: http://127.0.0.1:10000/wiki/File:Sunrise_over_fishing_boats_in_Kerala.jpg
Jul  7 23:56:57 mediawiki-vagrant apache2[6545]: [rewrite:trace3] [pid 6545] mod_rewrite.c(468): [client 10.0.2.2:56986] 10.0.2.2 - - [127.0.0.1/sid#7f720dfb0bb8][rid#7f720decc0a0/initial] applying pattern '^/$' to uri '/images/thumb/b/b0/Sunrise_over_fishing_boats_in_Kerala.jpg/800px-Sunrise_over_fishing_boats_in_Kerala.jpg', referer: http://127.0.0.1:10000/wiki/File:Sunrise_over_fishing_boats_in_Kerala.jpg
Jul  7 23:56:57 mediawiki-vagrant apache2[6545]: [rewrite:trace3] [pid 6545] mod_rewrite.c(468): [client 10.0.2.2:56986] 10.0.2.2 - - [127.0.0.1/sid#7f720dfb0bb8][rid#7f720decc0a0/initial] applying pattern '^/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/[^/]*([0-9]+)px-.*$' to uri '/images/thumb/b/b0/Sunrise_over_fishing_boats_in_Kerala.jpg/800px-Sunrise_over_fishing_boats_in_Kerala.jpg', referer: http://127.0.0.1:10000/wiki/File:Sunrise_over_fishing_boats_in_Kerala.jpg
Jul  7 23:56:57 mediawiki-vagrant apache2[6545]: [rewrite:trace4] [pid 6545] mod_rewrite.c(468): [client 10.0.2.2:56986] 10.0.2.2 - - [127.0.0.1/sid#7f720dfb0bb8][rid#7f720decc0a0/initial] RewriteCond: input='/images/thumb/b/b0/Sunrise_over_fishing_boats_in_Kerala.jpg/800px-Sunrise_over_fishing_boats_in_Kerala.jpg' pattern='!-f' => matched, referer: http://127.0.0.1:10000/wiki/File:Sunrise_over_fishing_boats_in_Kerala.jpg
Jul  7 23:56:57 mediawiki-vagrant apache2[6545]: [rewrite:trace4] [pid 6545] mod_rewrite.c(468): [client 10.0.2.2:56986] 10.0.2.2 - - [127.0.0.1/sid#7f720dfb0bb8][rid#7f720decc0a0/initial] RewriteCond: input='/images/thumb/b/b0/Sunrise_over_fishing_boats_in_Kerala.jpg/800px-Sunrise_over_fishing_boats_in_Kerala.jpg' pattern='!-d' => matched, referer: http://127.0.0.1:10000/wiki/File:Sunrise_over_fishing_boats_in_Kerala.jpg
Jul  7 23:56:57 mediawiki-vagrant apache2[6545]: [rewrite:trace2] [pid 6545] mod_rewrite.c(468): [client 10.0.2.2:56986] 10.0.2.2 - - [127.0.0.1/sid#7f720dfb0bb8][rid#7f720decc0a0/initial] rewrite '/images/thumb/b/b0/Sunrise_over_fishing_boats_in_Kerala.jpg/800px-Sunrise_over_fishing_boats_in_Kerala.jpg' -> '/w/thumb_handler.php', referer: http://127.0.0.1:10000/wiki/File:Sunrise_over_fishing_boats_in_Kerala.jpg
Jul  7 23:56:57 mediawiki-vagrant apache2[6545]: [rewrite:trace2] [pid 6545] mod_rewrite.c(468): [client 10.0.2.2:56986] 10.0.2.2 - - [127.0.0.1/sid#7f720dfb0bb8][rid#7f720decc0a0/initial] forcing '/w/thumb_handler.php' to get passed through to next API URI-to-filename handler, referer: http://127.0.0.1:10000/wiki/File:Sunrise_over_fishing_boats_in_Kerala.jpg
```

The thumbnail is at `/srv/images/thumb/b/b0/Sunrise_over_fishing_boats_in_Kerala.jpg/800px-Sunrise_over_fishing_boats_in_Kerala.jpg`. I don't get why the `!-f` rule matches, somehow the alias does not get applied?