I need to run danbooru on a subdirectory(for example, /danbooru), is this even possible? If it isn't, what would I have to modify to change this?
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.
https://github.com/r888888888/danbooru/issues/1850
https://github.com/r888888888/danbooru/compare/master...kxz:omnibooru
Danbooru still has a lot of paths hardcoded to the root directory, particularly in the Javascript and in DText. kxz had fixes for some of these issues, but he never pushed his work upstream. If you really need to make this work, his fork would be a good place to start. Otherwise, you're on your own.