Danbooru

Is it possible to run danbooru in a subdirectory?

Posted under Bugs & Features

Well, technically there's a config option as described in http://guides.rubyonrails.org/configuring.html#deploy-to-a-subdirectory-relative-url-root - you can try setting it in /config/environments/<your_environment>.rb. You'll also probably have to adjust nginx config so that it takes subdirectories into account when matching locations.

If that config option fails, maybe you can setup nginx or apache as a front-end server to rewrite the URL - let's say, if the unicorn is running on localhost:3000, front-end could redirect requests from yourdomain.com/subdir/$1 to localhost:3000/$1. Read up on nginx's proxy_pass option, and adjust the rest of the default config so that static files are still served through nginx.

1